package com.wicket.okrbff.biz.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.wicket.okrbff.biz.service.UserService;
import com.wicket.okrbff.biz.service.dto.common.BffUsersDto;
import com.wicket.okrbff.biz.service.dto.common.BffUsersUnionDto;
import com.wicket.okrbff.biz.service.dto.req.BatchClearTokenFromRedisReqDto;
import com.wicket.okrbff.biz.service.dto.req.BatchClearUserInfoFromRedisReqDto;
import com.wicket.okrbff.biz.service.dto.req.ChangePublicInfoFromRedisReqDto;
import com.wicket.okrcomponent.integration.dto.ImplementRealTimeUpdateMsgLocationPushComReqDto;
import com.wicket.okrcomponent.integration.dto.ImplementRealTimeUpdateMsgLocationPushComRespDto;
import com.wicket.okrframework.integration.dto.CheckCaptchaValidReqDto;
import com.wicket.okrbff.biz.service.dto.req.ClearTokenFromRedisReqDto;
import com.wicket.okrbff.biz.service.dto.req.ClearUserInfoFromRedisReqDto;
import com.wicket.okrbff.biz.service.dto.req.CreateTokenReqDto;
import com.wicket.okrbff.biz.service.dto.req.*;
import com.wicket.okrbff.biz.service.dto.res.BatchClearTokenFromRedisRespDto;
import com.wicket.okrbff.biz.service.dto.res.BatchClearUserInfoFromRedisRespDto;
import com.wicket.okrbff.biz.service.dto.res.ChangePublicInfoFromRedisRespDto;
import com.wicket.okrbff.biz.service.dto.res.CheckCaptchaValidRespDto;
import com.wicket.okrbff.biz.service.dto.res.ClearTokenFromRedisRespDto;
import com.wicket.okrbff.biz.service.dto.res.ClearUserInfoFromRedisRespDto;
import com.wicket.okrbff.biz.service.dto.res.CreateTokenRespDto;
import com.wicket.okrbff.biz.service.dto.res.*;
import com.wicket.okrbff.biz.service.nb.NbUser;
import com.wicket.okrbff.common.exception.BizException;
import com.wicket.okrbff.common.util.CommonFunctionHelper;
import com.wicket.okrbff.common.util.RedisUtil;
import com.wicket.okrframework.integration.*;
import com.wicket.okrframework.integration.dto.*;
import com.wicket.okrframework.integration.dto.PutPublicInfoToRedisReqDto;
import com.wicket.okrframework.integration.dto.PutPublicInfoToRedisRespDto;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.concurrent.Callable;
import java.util.stream.Collectors;
import com.wicket.okrbff.common.exception.Assert;
import com.wicket.okrcomponent.integration.FwCompMessageClient;
import com.wicket.okrcomponent.integration.dto.ImplementInitializationMessageLocationByLoginComRespDto;
import com.wicket.okrcomponent.integration.dto.ImplementInitializationMessageLocationByLoginComReqDto;
import com.wicket.okrcomponent.integration.FwCompInterfaceModeClient;
import com.wicket.okrcomponent.integration.dto.ImplementFieldsNameAndValueToOneDatasComRespDto;
import com.wicket.okrcomponent.integration.dto.ImplementFieldsNameAndValueToOneDatasComReqDto;
import com.wicket.okrcomponent.integration.dto.RealTimeMonitoringBehaviorInstructionDto;
import cn.hutool.core.collection.CollectionUtil;
import com.wicket.okrcomponent.integration.dto.JudgeIsInrealTimePushTopicMsgNumComRespDto;
import com.wicket.okrcomponent.integration.dto.JudgeIsInrealTimePushTopicMsgNumComReqDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Service
public class UserServiceImpl implements UserService {

    @Resource
    FwBaseBaseClient baseClient;
    @Resource
    FwBaseBusinessObjectClient businessObjectClient;
    @Resource
    FwBaseUserClient userClient;
    @Resource
    FwBaseDivineDataClient divineDataClient;
    @Resource
    NbUser nbUser;
    @Resource
    FwBaseMemberClient memberClient;
    @Resource
    FwBaseCaptchaClient captchaClient;
    @Resource
    FwBaseBaseClient fwBaseBaseClient;
    @Resource
    FwBaseBusinessObjectClient fwBaseBusinessObjectClient;
    @Resource
    FwBaseUserClient fwBaseUserClient;
    @Resource
    FwBaseMemberClient fwBaseMemberClient;
    @Resource
    FwBaseDivineDataClient fwBaseDivineDataClient;
    @Resource
    FwBaseCaptchaClient fwBaseCaptchaClient;
    @Resource
    private RedisUtil redisUtil;
@Resource
  FwCompMessageClient fwCompMessageClient;
@Resource
  FwCompInterfaceModeClient fwCompInterfaceModeClient;
@Resource
  FwBaseRoleClient fwBaseRoleClient;

    /**
   * 登录[1191]
   * gen by moon at 8/17/2022, 7:39:28 PM
   */
    @Trace(operationName = "登录")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffLoginRespDto login(BffLoginReqDto reqDto){
      
       
       CreateTokenRespDto generateTokenRes_1 = null;
if((reqDto!= null&& reqDto.getPassword() == null )&&(reqDto!= null&& reqDto.getPhone() != null )) {
        //if(登录.密码 等于空  and 登录.绑定手机 不等于空 )  1035
        
//ModelCode: checkCaptchaValid
        CheckCaptchaValidRespDto checkCaptchaValidRes = null;
    com.wicket.okrbff.biz.service.dto.req.CheckCaptchaValidReqDto checkCaptchaValidReq=new com.wicket.okrbff.biz.service.dto.req.CheckCaptchaValidReqDto();
  if(reqDto!=null){
      checkCaptchaValidReq.setPhone(reqDto.getPhone());//sourceId:43361_1_1036
checkCaptchaValidReq.setVerificationCode(reqDto.getVerificationCode());//sourceId:43362_1_1036
    }
  
    /*D1-检测验证码是否有效（特殊方法）[1185]  用于检测用户前端录入验证码是否有效 */
    
      checkCaptchaValidRes = nbUser.checkCaptchaValid(checkCaptchaValidReq);
      
      
QueryAppDetailRespDto queryAppDetailRespDto = null;
    QueryAppDetailReqDto queryAppDetailReqDto=new QueryAppDetailReqDto();
  queryAppDetailReqDto.setWebsite(CommonFunctionHelper.getSessionUrl());//ACCESS_ADDRESS//sourceId:60919_1_2291
  
    /*D1-2查询联盟应用详情[541]   */
    
      queryAppDetailRespDto = fwBaseBaseClient.queryAppDetail(queryAppDetailReqDto).getData();
      
      
if((checkCaptchaValidRes!= null&&  checkCaptchaValidRes.getIsInvalid() !=null && checkCaptchaValidRes.getIsInvalid().equals("TRUE"))) {
        //if(D1-检测验证码是否有效（特殊方法）.是否有效 等于 是)  1037
        
UserLoginRespDto userLoginRespDto = null;
    if(queryAppDetailRespDto !=null){
          UserLoginReqDto userLoginReqDto=new UserLoginReqDto();
  userLoginReqDto.setRoleCode("STAFF");//CUSTOM_CONVENTION//sourceId:56795_1_1045
if(reqDto!=null){
      userLoginReqDto.setUserName(reqDto.getUserName());//sourceId:27779_1_1045
userLoginReqDto.setPhone(reqDto.getPhone());//sourceId:27781_1_1045
userLoginReqDto.setPassword(reqDto.getPassword());//sourceId:27780_1_1045
    }
if(queryAppDetailRespDto!=null){
      userLoginReqDto.setSpaceId(queryAppDetailRespDto.getUniqueSpaceId());//sourceId:56796_1_1045
    }
  
    /*D1-用户登录验证[1193]   */
    
      userLoginRespDto = fwBaseBusinessObjectClient.userLogin(userLoginReqDto).getData();
      
      
           }
if((userLoginRespDto != null )) {
        //if(D1-用户登录验证.出参 不等于空 )  1053
        
//ModelCode: generateToken
        CreateTokenRespDto generateTokenRes = null;
    CreateTokenReqDto generateTokenReq=new CreateTokenReqDto();
  
  
    /*登录成功生成Token[1034] 同一个账号登录，清空改账号之前的token信息 用于前端用户登录时生成tokenId */
    
      generateTokenRes = nbUser.createToken(generateTokenReq);
      
      generateTokenRes_1 = generateTokenRes;
QuerySpaceDetailComRespDto querySpaceDetailComRespDto = null;
    if(queryAppDetailRespDto !=null){
          QuerySpaceDetailComReqDto querySpaceDetailComReqDto=new QuerySpaceDetailComReqDto();
  if(queryAppDetailRespDto!=null){
      querySpaceDetailComReqDto.setSpaceId(queryAppDetailRespDto.getUniqueSpaceId());//sourceId:27715_1_2281
    }
  
    /*D1-2查空间详情(公共)[402]   */
    
      querySpaceDetailComRespDto = fwBaseBaseClient.querySpaceDetailCom(querySpaceDetailComReqDto).getData();
      
      
           }
QueryPublicInfoDetailRespDto queryPublicInfoDetailRespDto = null;
    if(userLoginRespDto !=null&&querySpaceDetailComRespDto !=null){
          QueryPublicInfoDetailReqDto queryPublicInfoDetailReqDto=new QueryPublicInfoDetailReqDto();
  queryPublicInfoDetailReqDto.setRoleCode("STAFF");//CUSTOM_CONVENTION//sourceId:60884_1_2282
if(userLoginRespDto!=null){
      queryPublicInfoDetailReqDto.setUserId(userLoginRespDto.getUserId());//sourceId:60883_1_2282
    }
if(querySpaceDetailComRespDto!=null){
      queryPublicInfoDetailReqDto.setSpaceId(querySpaceDetailComRespDto.getSpaceId());//sourceId:151559_1_2282
    }
  
    /*D1-查账号公共信息详情[2098]   */
    
      queryPublicInfoDetailRespDto = fwBaseUserClient.queryPublicInfoDetail(queryPublicInfoDetailReqDto).getData();
      
      
           }
//ModelCode: clearTokenFromRedis
        ClearTokenFromRedisRespDto clearTokenFromRedisRes = null;
    if(queryPublicInfoDetailRespDto !=null){
          ClearTokenFromRedisReqDto clearTokenFromRedisReq=new ClearTokenFromRedisReqDto();
  if(queryPublicInfoDetailRespDto!=null){
      clearTokenFromRedisReq.setOriginalRoleMemberId(queryPublicInfoDetailRespDto.getOriginalRoleMemberId());//sourceId:62644_1_2415
    }
  
    /*Redis清空用户Token[1698]  入参身份ID，清除用户token */
    
      clearTokenFromRedisRes = nbUser.clearTokenFromRedis(clearTokenFromRedisReq);
      
      
           }
//ModelCode: putPublicInfoToRedis
        PutPublicInfoToRedisRespDto putPublicInfoToRedisRes = null;
    if(userLoginRespDto !=null&&queryPublicInfoDetailRespDto !=null&&querySpaceDetailComRespDto !=null){
          PutPublicInfoToRedisReqDto putPublicInfoToRedisReq=new PutPublicInfoToRedisReqDto();
  putPublicInfoToRedisReq.setRoleCode("STAFF");//CUSTOM_CONVENTION//sourceId:49846_1_2283
if(userLoginRespDto!=null){
      putPublicInfoToRedisReq.setUserId(userLoginRespDto.getUserId());//sourceId:45775_1_2283
    }
if(queryPublicInfoDetailRespDto!=null){
      putPublicInfoToRedisReq.setOriginalRoleMemberId(queryPublicInfoDetailRespDto.getOriginalRoleMemberId());//sourceId:45776_1_2283
putPublicInfoToRedisReq.setInductionRecordId(queryPublicInfoDetailRespDto.getInductionRecordId());//sourceId:45777_1_2283
putPublicInfoToRedisReq.setOrganizationId(queryPublicInfoDetailRespDto.getOrganizationId());//sourceId:200134_1_2283
putPublicInfoToRedisReq.setHighestOrgID(queryPublicInfoDetailRespDto.getHighestOrgID());//sourceId:200135_1_2283
putPublicInfoToRedisReq.setInductionUnitTypeCode(queryPublicInfoDetailRespDto.getInductionUnitTypeCode());//sourceId:47096_1_2283
    if(queryPublicInfoDetailRespDto.getInductionUnitTypeCode()!=null && queryPublicInfoDetailRespDto.getInductionUnitTypeCode().equals("DEPT")){
        putPublicInfoToRedisReq.setDeptId(queryPublicInfoDetailRespDto.getEntityId());
    }
//putPublicInfoToRedisReq.setDeptId();//GET_DEPT_ID  TODO ruizhe dong//sourceId:45779_1_2283
    }
if(querySpaceDetailComRespDto!=null){
      putPublicInfoToRedisReq.setSpaceId(querySpaceDetailComRespDto.getSpaceId());//sourceId:45780_1_2283
putPublicInfoToRedisReq.setSceneId(querySpaceDetailComRespDto.getSubjectionSceneId());//sourceId:45781_1_2283
putPublicInfoToRedisReq.setAppId(querySpaceDetailComRespDto.getSubjectionAppId());//sourceId:45782_1_2283
    }
if(generateTokenRes!=null){
      putPublicInfoToRedisReq.setToken(generateTokenRes.getToken());//sourceId:49040_1_2283
    }
  
    /*D-公共信息存储Redis[1195]  用于用户前端登录成功后，将登录的公共信息缓存到REDIS中 */

      putPublicInfoToRedisRes = fwBaseDivineDataClient.putPublicInfoToRedis(putPublicInfoToRedisReq).getData();

      
           }
//ModelCode: asynchronizationStart
    UserLoginRespDto finalUserLoginRespDto = userLoginRespDto;
    QuerySpaceDetailComRespDto finalQuerySpaceDetailComRespDto = querySpaceDetailComRespDto;
    Callable<String> call = new Callable<String>() {

    @Override
    public String call() throws Exception {
        //执行方法
QueryUserLoginInfoRespDto queryUserLoginInfoRespDto = null;
    if(finalUserLoginRespDto !=null&& finalQuerySpaceDetailComRespDto !=null){
          QueryUserLoginInfoReqDto queryUserLoginInfoReqDto=new QueryUserLoginInfoReqDto();
  queryUserLoginInfoReqDto.setRoleCode("STAFF");//CUSTOM_CONVENTION//sourceId:34426_1_1340
if(finalUserLoginRespDto !=null){
      queryUserLoginInfoReqDto.setUserId(finalUserLoginRespDto.getUserId());//sourceId:53584_1_1340
    }
if(finalQuerySpaceDetailComRespDto !=null){
      queryUserLoginInfoReqDto.setSpaceId(finalQuerySpaceDetailComRespDto.getSpaceId());//sourceId:47171_1_1340
queryUserLoginInfoReqDto.setAppId(finalQuerySpaceDetailComRespDto.getSubjectionAppId());//sourceId:47174_1_1340
    }
  
    /*D1-查询用户登录信息[1194]   */
    Assert.isNull(queryUserLoginInfoReqDto.getUserId(),"登录-D1-查询用户登录信息-账号不能为空",false);
Assert.isNull(queryUserLoginInfoReqDto.getRoleCode(),"登录-D1-查询用户登录信息-身份角色编码不能为空",false);
Assert.isNull(queryUserLoginInfoReqDto.getSpaceId(),"登录-D1-查询用户登录信息-创建于空间ID不能为空",false);
Assert.isNull(queryUserLoginInfoReqDto.getAppId(),"登录-D1-查询用户登录信息-创建于联盟应用ID不能为空",false);
      queryUserLoginInfoRespDto = fwBaseBusinessObjectClient.queryUserLoginInfo(queryUserLoginInfoReqDto).getData();
      
      
           }
AddUsersUnionRespDto addUsersUnionRespDto = null;
    if(queryUserLoginInfoRespDto !=null){
          AddUsersUnionReqDto addUsersUnionReqDto=new AddUsersUnionReqDto();
  addUsersUnionReqDto.setUnionAppObjectType("XSZ");//sourceId:30584_1_1342
addUsersUnionReqDto.setUnionAppObjectId(CommonFunctionHelper.getUid());//DISTRIBUTED_ID//sourceId:30585_1_1342
if(queryUserLoginInfoRespDto!=null){
      addUsersUnionReqDto.setUnionAppObjectName(queryUserLoginInfoRespDto.getUserId());//sourceId:30586_1_1342
    }
  
    /*D1-2新增联盟用户[1021]   */
    Assert.isNull(addUsersUnionReqDto.getUnionAppObjectType(),"登录-D1-2新增联盟用户-联盟应用对象类型不能为空",false);
Assert.isNull(addUsersUnionReqDto.getUnionAppObjectId(),"登录-D1-2新增联盟用户-联盟应用用户ID不能为空",false);
      addUsersUnionRespDto = fwBaseUserClient.addUsersUnion(addUsersUnionReqDto).getData();
      
      
           }
//ModelCode: asynchronizationEnd
        return "";
    }
};
CommonFunctionHelper.asynExcute(call);
//processBranchName:正常结束 ,processBranchId:1344
        
      }
      }
else{
       //else  1041
      
//异常结束 1042
      throw new BizException("C00006","对不起，验证码错误，请输入正确！～！",false);
    }
      }
else if((reqDto!= null&& reqDto.getPassword() != null &&reqDto!= null&& reqDto.getRoleMemberCode() != null )){
       //elseif((登录.密码 不等于空  and 登录.身份人员编号 不等于空 ))  1039
      
QueryAppDetailRespDto queryAppDetailRespDto_2 = null;
    QueryAppDetailReqDto queryAppDetailReqDto_1=new QueryAppDetailReqDto();
  queryAppDetailReqDto_1.setWebsite(CommonFunctionHelper.getSessionUrl());//ACCESS_ADDRESS//sourceId:60919_1_2293
  
    /*D1-2查询联盟应用详情[541]   */
    
      queryAppDetailRespDto_2 = fwBaseBaseClient.queryAppDetail(queryAppDetailReqDto_1).getData();
      
      
CheckLoginNumberRespDto checkLoginNumberRespDto = null;
    if(queryAppDetailRespDto_2 !=null){
          CheckLoginNumberReqDto checkLoginNumberReqDto=new CheckLoginNumberReqDto();
  checkLoginNumberReqDto.setRoleCode("STAFF");//CUSTOM_CONVENTION//sourceId:27760_1_1040
if(reqDto!=null){
      checkLoginNumberReqDto.setRoleMemberCode(reqDto.getRoleMemberCode());//sourceId:27759_1_1040
    }
if(queryAppDetailRespDto_2!=null){
      checkLoginNumberReqDto.setSpaceId(queryAppDetailRespDto_2.getUniqueSpaceId());//sourceId:27761_1_1040
    }
  
    /*D1-工号信息验证[1192]   */
    
      checkLoginNumberRespDto = fwBaseBusinessObjectClient.checkLoginNumber(checkLoginNumberReqDto).getData();
      
      
           }
if((checkLoginNumberRespDto != null )) {
        //if(D1-工号信息验证.出参 不等于空 )  1060
        
UserLoginRespDto userLoginRespDto_2 = null;
    if(checkLoginNumberRespDto !=null&&queryAppDetailRespDto_2 !=null){
          UserLoginReqDto userLoginReqDto_1=new UserLoginReqDto();
  userLoginReqDto_1.setRoleCode("STAFF");//CUSTOM_CONVENTION//sourceId:56795_1_1061
if(checkLoginNumberRespDto!=null){
      userLoginReqDto_1.setUserId(checkLoginNumberRespDto.getUserId());//sourceId:27778_1_1061
    }
if(reqDto!=null){
      userLoginReqDto_1.setUserName(reqDto.getUserName());//sourceId:27779_1_1061
userLoginReqDto_1.setPhone(reqDto.getPhone());//sourceId:27781_1_1061
userLoginReqDto_1.setPassword(reqDto.getPassword());//sourceId:27780_1_1061
    }
if(queryAppDetailRespDto_2!=null){
      userLoginReqDto_1.setSpaceId(queryAppDetailRespDto_2.getUniqueSpaceId());//sourceId:56796_1_1061
    }
  
    /*D1-用户登录验证[1193]   */
    
      userLoginRespDto_2 = fwBaseBusinessObjectClient.userLogin(userLoginReqDto_1).getData();
      
      
           }
if((userLoginRespDto_2 != null )) {
        //if(D1-用户登录验证.出参 不等于空 )  1062
        
//ModelCode: generateToken
        CreateTokenRespDto generateTokenRes_2 = null;
    CreateTokenReqDto generateTokenReq_1=new CreateTokenReqDto();
  
  
    /*登录成功生成Token[1034] 同一个账号登录，清空改账号之前的token信息 用于前端用户登录时生成tokenId */
    
      generateTokenRes_2 = nbUser.createToken(generateTokenReq_1);
      
      generateTokenRes_1 = generateTokenRes_2;
QuerySpaceDetailComRespDto querySpaceDetailComRespDto_2 = null;
    if(queryAppDetailRespDto_2 !=null){
          QuerySpaceDetailComReqDto querySpaceDetailComReqDto_1=new QuerySpaceDetailComReqDto();
  if(queryAppDetailRespDto_2!=null){
      querySpaceDetailComReqDto_1.setSpaceId(queryAppDetailRespDto_2.getUniqueSpaceId());//sourceId:27715_1_2284
    }
  
    /*D1-2查空间详情(公共)[402]   */
    
      querySpaceDetailComRespDto_2 = fwBaseBaseClient.querySpaceDetailCom(querySpaceDetailComReqDto_1).getData();
      
      
           }
QueryPublicInfoDetailRespDto queryPublicInfoDetailRespDto_2 = null;
    if(userLoginRespDto_2 !=null){
          QueryPublicInfoDetailReqDto queryPublicInfoDetailReqDto_1=new QueryPublicInfoDetailReqDto();
  queryPublicInfoDetailReqDto_1.setRoleCode("STAFF");//CUSTOM_CONVENTION//sourceId:60884_1_2285
if(userLoginRespDto_2!=null){
      queryPublicInfoDetailReqDto_1.setUserId(userLoginRespDto_2.getUserId());//sourceId:60883_1_2285
    }

        if(querySpaceDetailComRespDto_2!=null){
            queryPublicInfoDetailReqDto_1.setSpaceId(querySpaceDetailComRespDto_2.getSpaceId());//sourceId:151559_1_2282
        }
  
    /*D1-查账号公共信息详情[2098]   */
    
      queryPublicInfoDetailRespDto_2 = fwBaseUserClient.queryPublicInfoDetail(queryPublicInfoDetailReqDto_1).getData();
      
      
           }
//ModelCode: clearTokenFromRedis
        ClearTokenFromRedisRespDto clearTokenFromRedisRes_1 = null;
    if(queryPublicInfoDetailRespDto_2 !=null){
          ClearTokenFromRedisReqDto clearTokenFromRedisReq_1=new ClearTokenFromRedisReqDto();
  if(queryPublicInfoDetailRespDto_2!=null){
      clearTokenFromRedisReq_1.setOriginalRoleMemberId(queryPublicInfoDetailRespDto_2.getOriginalRoleMemberId());//sourceId:62644_1_2416
    }
  
    /*Redis清空用户Token[1698]  入参身份ID，清除用户token */
    
      clearTokenFromRedisRes_1 = nbUser.clearTokenFromRedis(clearTokenFromRedisReq_1);
      
      
           }
//ModelCode: putPublicInfoToRedis
        PutPublicInfoToRedisRespDto putPublicInfoToRedisRes_1 = null;
    if(userLoginRespDto_2 !=null&&queryPublicInfoDetailRespDto_2 !=null&&querySpaceDetailComRespDto_2 !=null){
          PutPublicInfoToRedisReqDto putPublicInfoToRedisReq_1=new PutPublicInfoToRedisReqDto();
  putPublicInfoToRedisReq_1.setRoleCode("STAFF");//CUSTOM_CONVENTION//sourceId:49846_1_2286
if(userLoginRespDto_2!=null){
      putPublicInfoToRedisReq_1.setUserId(userLoginRespDto_2.getUserId());//sourceId:45775_1_2286
    }
if(queryPublicInfoDetailRespDto_2!=null){
      putPublicInfoToRedisReq_1.setOriginalRoleMemberId(queryPublicInfoDetailRespDto_2.getOriginalRoleMemberId());//sourceId:45776_1_2286
putPublicInfoToRedisReq_1.setInductionRecordId(queryPublicInfoDetailRespDto_2.getInductionRecordId());//sourceId:45777_1_2286
putPublicInfoToRedisReq_1.setOrganizationId(queryPublicInfoDetailRespDto_2.getOrganizationId());//sourceId:45778_1_2286
putPublicInfoToRedisReq_1.setInductionUnitTypeCode(queryPublicInfoDetailRespDto_2.getInductionUnitTypeCode());//sourceId:47096_1_2286
    if(queryPublicInfoDetailRespDto_2.getInductionUnitTypeCode()!=null && queryPublicInfoDetailRespDto_2.getInductionUnitTypeCode().equals("DEPT")){
        putPublicInfoToRedisReq_1.setDeptId(queryPublicInfoDetailRespDto_2.getEntityId());
    }
//putPublicInfoToRedisReq_1.setDeptId();//GET_DEPT_ID  TODO ruizhe dong//sourceId:45779_1_2286
    putPublicInfoToRedisReq_1.setHighestOrgID(queryPublicInfoDetailRespDto_2.getHighestOrgID());
    }
if(querySpaceDetailComRespDto_2!=null){
      putPublicInfoToRedisReq_1.setSpaceId(querySpaceDetailComRespDto_2.getSpaceId());//sourceId:45780_1_2286
putPublicInfoToRedisReq_1.setSceneId(querySpaceDetailComRespDto_2.getSubjectionSceneId());//sourceId:45781_1_2286
putPublicInfoToRedisReq_1.setAppId(querySpaceDetailComRespDto_2.getSubjectionAppId());//sourceId:45782_1_2286
    }
if(generateTokenRes_2!=null){
      putPublicInfoToRedisReq_1.setToken(generateTokenRes_2.getToken());//sourceId:49040_1_2286
    }
  
    /*D-公共信息存储Redis[1195]  用于用户前端登录成功后，将登录的公共信息缓存到REDIS中 */

      putPublicInfoToRedisRes_1 = fwBaseDivineDataClient.putPublicInfoToRedis(putPublicInfoToRedisReq_1).getData();
      
      
           }
//ModelCode: asynchronizationStart
    UserLoginRespDto finalUserLoginRespDto_ = userLoginRespDto_2;
    QuerySpaceDetailComRespDto finalQuerySpaceDetailComRespDto_ = querySpaceDetailComRespDto_2;
    Callable<String> call = new Callable<String>() {

    @Override
    public String call() throws Exception {
        //执行方法
QueryUserLoginInfoRespDto queryUserLoginInfoRespDto_2 = null;
    if(finalUserLoginRespDto_ !=null&& finalQuerySpaceDetailComRespDto_ !=null){
          QueryUserLoginInfoReqDto queryUserLoginInfoReqDto_1=new QueryUserLoginInfoReqDto();
  queryUserLoginInfoReqDto_1.setRoleCode("STAFF");//CUSTOM_CONVENTION//sourceId:34426_1_1348
if(finalUserLoginRespDto_ !=null){
      queryUserLoginInfoReqDto_1.setUserId(finalUserLoginRespDto_.getUserId());//sourceId:53584_1_1348
    }
if(finalQuerySpaceDetailComRespDto_ !=null){
      queryUserLoginInfoReqDto_1.setSpaceId(finalQuerySpaceDetailComRespDto_.getSpaceId());//sourceId:47171_1_1348
queryUserLoginInfoReqDto_1.setAppId(finalQuerySpaceDetailComRespDto_.getSubjectionAppId());//sourceId:47174_1_1348
    }
  
    /*D1-查询用户登录信息[1194]   */
    Assert.isNull(queryUserLoginInfoReqDto_1.getUserId(),"登录-D1-查询用户登录信息-账号不能为空",false);
Assert.isNull(queryUserLoginInfoReqDto_1.getRoleCode(),"登录-D1-查询用户登录信息-身份角色编码不能为空",false);
Assert.isNull(queryUserLoginInfoReqDto_1.getSpaceId(),"登录-D1-查询用户登录信息-创建于空间ID不能为空",false);
Assert.isNull(queryUserLoginInfoReqDto_1.getAppId(),"登录-D1-查询用户登录信息-创建于联盟应用ID不能为空",false);
      queryUserLoginInfoRespDto_2 = fwBaseBusinessObjectClient.queryUserLoginInfo(queryUserLoginInfoReqDto_1).getData();
      
      
           }
AddUsersUnionRespDto addUsersUnionRespDto_1 = null;
    if(queryUserLoginInfoRespDto_2 !=null){
          AddUsersUnionReqDto addUsersUnionReqDto_1=new AddUsersUnionReqDto();
  addUsersUnionReqDto_1.setUnionAppObjectType("XSZ");//sourceId:30584_1_1350
addUsersUnionReqDto_1.setUnionAppObjectId(CommonFunctionHelper.getUid());//DISTRIBUTED_ID//sourceId:30585_1_1350
if(queryUserLoginInfoRespDto_2!=null){
      addUsersUnionReqDto_1.setUnionAppObjectName(queryUserLoginInfoRespDto_2.getUserId());//sourceId:30586_1_1350
    }
  
    /*D1-2新增联盟用户[1021]   */
    Assert.isNull(addUsersUnionReqDto_1.getUnionAppObjectType(),"登录-D1-2新增联盟用户-联盟应用对象类型不能为空",false);
Assert.isNull(addUsersUnionReqDto_1.getUnionAppObjectId(),"登录-D1-2新增联盟用户-联盟应用用户ID不能为空",false);
Assert.isNull(addUsersUnionReqDto_1.getOriginalRoleMemberId(),"登录-D1-2新增联盟用户-身份人员ID不能为空",false);
      addUsersUnionRespDto_1 = fwBaseUserClient.addUsersUnion(addUsersUnionReqDto_1).getData();
      
      
           }
//ModelCode: asynchronizationEnd
        return "";
    }
};
CommonFunctionHelper.asynExcute(call);
//processBranchName:正常结束 ,processBranchId:1352
        
      }
      }
    }
else if((reqDto!= null&& reqDto.getUserName() != null ||reqDto!= null&& reqDto.getPhone() != null )&&(reqDto!= null&& reqDto.getPassword() != null )){
       //elseif((登录.用户名 不等于空  or 登录.绑定手机 不等于空 ) and 登录.密码 不等于空 )  1043
      
QueryAppDetailRespDto queryAppDetailRespDto_3 = null;
    QueryAppDetailReqDto queryAppDetailReqDto_2=new QueryAppDetailReqDto();
  queryAppDetailReqDto_2.setWebsite(CommonFunctionHelper.getSessionUrl());//ACCESS_ADDRESS//sourceId:60919_1_2294
  
    /*D1-2查询联盟应用详情[541]   */
    
      queryAppDetailRespDto_3 = fwBaseBaseClient.queryAppDetail(queryAppDetailReqDto_2).getData();
      
      
UserLoginRespDto userLoginRespDto_3 = null;
    if(queryAppDetailRespDto_3 !=null){
          UserLoginReqDto userLoginReqDto_2=new UserLoginReqDto();
  userLoginReqDto_2.setRoleCode("STAFF");//CUSTOM_CONVENTION//sourceId:56795_1_1044
if(reqDto!=null){
      userLoginReqDto_2.setUserName(reqDto.getUserName());//sourceId:27779_1_1044
userLoginReqDto_2.setPhone(reqDto.getPhone());//sourceId:27781_1_1044
userLoginReqDto_2.setPassword(reqDto.getPassword());//sourceId:27780_1_1044
    }
if(queryAppDetailRespDto_3!=null){
      userLoginReqDto_2.setSpaceId(queryAppDetailRespDto_3.getUniqueSpaceId());//sourceId:56796_1_1044
    }
  
    /*D1-用户登录验证[1193]   */
    
      userLoginRespDto_3 = fwBaseBusinessObjectClient.userLogin(userLoginReqDto_2).getData();
      
      
           }
if((userLoginRespDto_3 != null )) {
        //if(D1-用户登录验证.出参 不等于空 )  1069
        
//ModelCode: generateToken
        CreateTokenRespDto generateTokenRes_3 = null;
    CreateTokenReqDto generateTokenReq_2=new CreateTokenReqDto();
  
  
    /*登录成功生成Token[1034] 同一个账号登录，清空改账号之前的token信息 用于前端用户登录时生成tokenId */
    
      generateTokenRes_3 = nbUser.createToken(generateTokenReq_2);
      
      generateTokenRes_1 = generateTokenRes_3;
QuerySpaceDetailComRespDto querySpaceDetailComRespDto_3 = null;
    if(queryAppDetailRespDto_3 !=null){
          QuerySpaceDetailComReqDto querySpaceDetailComReqDto_2=new QuerySpaceDetailComReqDto();
  if(queryAppDetailRespDto_3!=null){
      querySpaceDetailComReqDto_2.setSpaceId(queryAppDetailRespDto_3.getUniqueSpaceId());//sourceId:27715_1_2290
    }
  
    /*D1-2查空间详情(公共)[402]   */
    
      querySpaceDetailComRespDto_3 = fwBaseBaseClient.querySpaceDetailCom(querySpaceDetailComReqDto_2).getData();
      
      
           }
QueryPublicInfoDetailRespDto queryPublicInfoDetailRespDto_3 = null;
    if(userLoginRespDto_3 !=null&&querySpaceDetailComRespDto_3 !=null){
          QueryPublicInfoDetailReqDto queryPublicInfoDetailReqDto_2=new QueryPublicInfoDetailReqDto();
  queryPublicInfoDetailReqDto_2.setRoleCode("STAFF");//CUSTOM_CONVENTION//sourceId:60884_1_2288
if(userLoginRespDto_3!=null){
      queryPublicInfoDetailReqDto_2.setUserId(userLoginRespDto_3.getUserId());//sourceId:60883_1_2288
    }
if(querySpaceDetailComRespDto_3!=null){
      queryPublicInfoDetailReqDto_2.setSpaceId(querySpaceDetailComRespDto_3.getSpaceId());//sourceId:151559_1_2288
    }
  
    /*D1-查账号公共信息详情[2098]   */
    
      queryPublicInfoDetailRespDto_3 = fwBaseUserClient.queryPublicInfoDetail(queryPublicInfoDetailReqDto_2).getData();
      
      
           }
//ModelCode: clearTokenFromRedis
        ClearTokenFromRedisRespDto clearTokenFromRedisRes_2 = null;
    if(queryPublicInfoDetailRespDto_3 !=null){
          ClearTokenFromRedisReqDto clearTokenFromRedisReq_2=new ClearTokenFromRedisReqDto();
  if(queryPublicInfoDetailRespDto_3!=null){
      clearTokenFromRedisReq_2.setOriginalRoleMemberId(queryPublicInfoDetailRespDto_3.getOriginalRoleMemberId());//sourceId:62644_1_2417
    }
  
    /*Redis清空用户Token[1698]  入参身份ID，清除用户token */
    
      clearTokenFromRedisRes_2 = nbUser.clearTokenFromRedis(clearTokenFromRedisReq_2);
      
      
           }
//ModelCode: putPublicInfoToRedis
        PutPublicInfoToRedisRespDto putPublicInfoToRedisRes_2 = null;
    if(userLoginRespDto_3 !=null&&queryPublicInfoDetailRespDto_3 !=null&&querySpaceDetailComRespDto_3 !=null){
          PutPublicInfoToRedisReqDto putPublicInfoToRedisReq_2=new PutPublicInfoToRedisReqDto();
  putPublicInfoToRedisReq_2.setRoleCode("STAFF");//CUSTOM_CONVENTION//sourceId:49846_1_2289
if(userLoginRespDto_3!=null){
      putPublicInfoToRedisReq_2.setUserId(userLoginRespDto_3.getUserId());//sourceId:45775_1_2289
    }
if(queryPublicInfoDetailRespDto_3!=null){
      putPublicInfoToRedisReq_2.setOriginalRoleMemberId(queryPublicInfoDetailRespDto_3.getOriginalRoleMemberId());//sourceId:45776_1_2289
putPublicInfoToRedisReq_2.setInductionRecordId(queryPublicInfoDetailRespDto_3.getInductionRecordId());//sourceId:45777_1_2289
putPublicInfoToRedisReq_2.setOrganizationId(queryPublicInfoDetailRespDto_3.getOrganizationId());//sourceId:45778_1_2289
putPublicInfoToRedisReq_2.setInductionUnitTypeCode(queryPublicInfoDetailRespDto_3.getInductionUnitTypeCode());//sourceId:47096_1_2289
    if(queryPublicInfoDetailRespDto_3.getInductionUnitTypeCode()!=null && queryPublicInfoDetailRespDto_3.getInductionUnitTypeCode().equals("DEPT")){
        putPublicInfoToRedisReq_2.setDeptId(queryPublicInfoDetailRespDto_3.getEntityId());
    }
//putPublicInfoToRedisReq_2.setDeptId();//GET_DEPT_ID  TODO ruizhe dong//sourceId:45779_1_2289
    putPublicInfoToRedisReq_2.setHighestOrgID(queryPublicInfoDetailRespDto_3.getHighestOrgID());
    }
if(querySpaceDetailComRespDto_3!=null){
      putPublicInfoToRedisReq_2.setSpaceId(querySpaceDetailComRespDto_3.getSpaceId());//sourceId:45780_1_2289
putPublicInfoToRedisReq_2.setSceneId(querySpaceDetailComRespDto_3.getSubjectionSceneId());//sourceId:45781_1_2289
putPublicInfoToRedisReq_2.setAppId(querySpaceDetailComRespDto_3.getSubjectionAppId());//sourceId:45782_1_2289
    }
if(generateTokenRes_3!=null){
      putPublicInfoToRedisReq_2.setToken(generateTokenRes_3.getToken());//sourceId:49040_1_2289
    }
  
    /*D-公共信息存储Redis[1195]  用于用户前端登录成功后，将登录的公共信息缓存到REDIS中 */

      putPublicInfoToRedisRes_2 = fwBaseDivineDataClient.putPublicInfoToRedis(putPublicInfoToRedisReq_2).getData();
      
      
           }
//ModelCode: asynchronizationStart
    UserLoginRespDto finalUserLoginRespDto_ = userLoginRespDto_3;
    QuerySpaceDetailComRespDto finalQuerySpaceDetailComRespDto_ = querySpaceDetailComRespDto_3;
    Callable<String> call = new Callable<String>() {

    @Override
    public String call() throws Exception {
        //执行方法
QueryUserLoginInfoRespDto queryUserLoginInfoRespDto_3 = null;
    if(finalUserLoginRespDto_ !=null&& finalQuerySpaceDetailComRespDto_ !=null){
          QueryUserLoginInfoReqDto queryUserLoginInfoReqDto_2=new QueryUserLoginInfoReqDto();
  queryUserLoginInfoReqDto_2.setRoleCode("STAFF");//CUSTOM_CONVENTION//sourceId:34426_1_1356
if(finalUserLoginRespDto_ !=null){
      queryUserLoginInfoReqDto_2.setUserId(finalUserLoginRespDto_.getUserId());//sourceId:53584_1_1356
    }
if(finalQuerySpaceDetailComRespDto_ !=null){
      queryUserLoginInfoReqDto_2.setSpaceId(finalQuerySpaceDetailComRespDto_.getSpaceId());//sourceId:47171_1_1356
queryUserLoginInfoReqDto_2.setAppId(finalQuerySpaceDetailComRespDto_.getSubjectionAppId());//sourceId:47174_1_1356
    }
  
    /*D1-查询用户登录信息[1194]   */
    Assert.isNull(queryUserLoginInfoReqDto_2.getUserId(),"登录-D1-查询用户登录信息-账号不能为空",false);
Assert.isNull(queryUserLoginInfoReqDto_2.getRoleCode(),"登录-D1-查询用户登录信息-身份角色编码不能为空",false);
Assert.isNull(queryUserLoginInfoReqDto_2.getSpaceId(),"登录-D1-查询用户登录信息-创建于空间ID不能为空",false);
Assert.isNull(queryUserLoginInfoReqDto_2.getAppId(),"登录-D1-查询用户登录信息-创建于联盟应用ID不能为空",false);
      queryUserLoginInfoRespDto_3 = fwBaseBusinessObjectClient.queryUserLoginInfo(queryUserLoginInfoReqDto_2).getData();
      
      
           }
AddUsersUnionRespDto addUsersUnionRespDto_2 = null;
    if(queryUserLoginInfoRespDto_3 !=null){
          AddUsersUnionReqDto addUsersUnionReqDto_2=new AddUsersUnionReqDto();
  addUsersUnionReqDto_2.setUnionAppObjectType("XSZ");//sourceId:30584_1_1358
addUsersUnionReqDto_2.setUnionAppObjectId(CommonFunctionHelper.getUid());//DISTRIBUTED_ID//sourceId:30585_1_1358
if(queryUserLoginInfoRespDto_3!=null){
      addUsersUnionReqDto_2.setUnionAppObjectName(queryUserLoginInfoRespDto_3.getUserId());//sourceId:30586_1_1358
    }
  
    /*D1-2新增联盟用户[1021]   */
    Assert.isNull(addUsersUnionReqDto_2.getUnionAppObjectType(),"登录-D1-2新增联盟用户-联盟应用对象类型不能为空",false);
Assert.isNull(addUsersUnionReqDto_2.getUnionAppObjectId(),"登录-D1-2新增联盟用户-联盟应用用户ID不能为空",false);
Assert.isNull(addUsersUnionReqDto_2.getOriginalRoleMemberId(),"登录-D1-2新增联盟用户-身份人员ID不能为空",false);
      addUsersUnionRespDto_2 = fwBaseUserClient.addUsersUnion(addUsersUnionReqDto_2).getData();
      
      
           }
//ModelCode: asynchronizationEnd
        return "";
    }
};
CommonFunctionHelper.asynExcute(call);
//processBranchName:正常结束 ,processBranchId:1360
        
      }
    }
BffLoginRespDto retData = new BffLoginRespDto();
  if(generateTokenRes_1!=null){
      retData.setToken(generateTokenRes_1.getToken());//sourceId:43371_1
    }
  

  
  
return retData;
  }

    /**
   * B1-切换公共信息[1625]
   * gen by moon at 8/10/2022, 3:36:24 AM
   */
    @Trace(operationName = "B1-切换公共信息")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffChangePublicInfoRespDto changePublicInfo(BffChangePublicInfoReqDto reqDto){
      
       
       //步骤0: Redis切换公共信息（后端） - changePublicInfoFromRedis
     //ModelCode: changePublicInfoFromRedis
        ChangePublicInfoFromRedisRespDto changePublicInfoFromRedisRes = null;
    ChangePublicInfoFromRedisReqDto changePublicInfoFromRedisReq=new ChangePublicInfoFromRedisReqDto();
  if(reqDto!=null){
      changePublicInfoFromRedisReq.setInductionRecordId(reqDto.getInductionRecordId());//sourceId:47178_1
    }
  
    /*Redis切换公共信息（后端）[1624]  用于切换用户公共缓存信息，在个人中心面板上切换就职记录时触发 */
    
      changePublicInfoFromRedisRes = nbUser.changePublicInfoFromRedis(changePublicInfoFromRedisReq);
      
      
    
BffChangePublicInfoRespDto retData = new BffChangePublicInfoRespDto();
  
  

  
  
return retData;
  }



    /**
   * B1-2换绑手机号[416]
   * gen by moon at 8/10/2022, 3:29:27 AM
   */
    @Trace(operationName = "B1-2换绑手机号")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffUpdateChangePhoneRespDto updateChangePhone(BffUpdateChangePhoneReqDto reqDto){
      
       
       //virtualUsage D1-检测验证码是否有效（特殊方法）  2640
      //ModelCode: checkCaptchaValid
        CheckCaptchaValidRespDto checkCaptchaValidRes = null;
    com.wicket.okrbff.biz.service.dto.req.CheckCaptchaValidReqDto checkCaptchaValidReq=new com.wicket.okrbff.biz.service.dto.req.CheckCaptchaValidReqDto();
  if(reqDto!=null){
      checkCaptchaValidReq.setPhone(reqDto.getPhone());//sourceId:66792_1_2640
checkCaptchaValidReq.setVerificationCode(reqDto.getVerificationCode());//sourceId:66793_1_2640
    }
  
    /*D1-检测验证码是否有效（特殊方法）[1185]  用于检测用户前端录入验证码是否有效 */
    
      checkCaptchaValidRes = nbUser.checkCaptchaValid(checkCaptchaValidReq);
      
      
if((checkCaptchaValidRes!= null&&  checkCaptchaValidRes.getIsInvalid() !=null && checkCaptchaValidRes.getIsInvalid().equals("TRUE"))) {
        //if(D1-检测验证码是否有效（特殊方法）.是否有效 等于 是)  2641
        
UpdateChangePhoneRespDto updateChangePhoneRespDto = null;
    UpdateChangePhoneReqDto updateChangePhoneReqDto=new UpdateChangePhoneReqDto();
  updateChangePhoneReqDto.setUserId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecUserId());//CURRENT_USERID//sourceId:30196_1_2642
if(reqDto!=null){
      updateChangePhoneReqDto.setPhone(reqDto.getPhone());//sourceId:30197_1_2642
    }
  
    /*D1-2修改手机号[415]   */
    Assert.isNull(updateChangePhoneReqDto.getUserId(),"B1-2换绑手机号-D1-2修改手机号-个人账号不能为空",false);
Assert.isNull(updateChangePhoneReqDto.getPhone(),"B1-2换绑手机号-D1-2修改手机号-绑定手机不能为空",false);
      updateChangePhoneRespDto = fwBaseUserClient.updateChangePhone(updateChangePhoneReqDto).getData();
      
      
QueryBeginMemberListRespDto queryBeginMemberListRespDto = null;
    QueryBeginMemberListReqDto queryBeginMemberListReqDto=new QueryBeginMemberListReqDto();
  queryBeginMemberListReqDto.setUserId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecUserId());//CURRENT_USERID//sourceId:51408_1_2643
  
    /*D1-2查询身份人员列表[988]   */
    
      queryBeginMemberListRespDto = fwBaseMemberClient.queryBeginMemberList(queryBeginMemberListReqDto).getData();
      
      
//ModelCode: batchClearUserInfoFromRedis
        BatchClearUserInfoFromRedisRespDto batchClearUserInfoFromRedisRes = null;
    if(queryBeginMemberListRespDto !=null){
          BatchClearUserInfoFromRedisReqDto batchClearUserInfoFromRedisReq=new BatchClearUserInfoFromRedisReqDto();
  if(queryBeginMemberListRespDto!=null){
      batchClearUserInfoFromRedisReq.setBeginMemberList(queryBeginMemberListRespDto.getBeginMemberList().stream().map(item->item.getOriginalRoleMemberId())
        .collect(Collectors.toList()));//sourceId:51411_1_2644
    }
  
    /*Redis批量清空用户信息[1713]  入参身份ID数据集，清除用户就职信息缓存 */
    
      batchClearUserInfoFromRedisRes = nbUser.batchClearUserInfoFromRedis(batchClearUserInfoFromRedisReq);
      
      
           }
//processBranchName:正常结束 ,processBranchId:2645
        
      }
BffUpdateChangePhoneRespDto retData = new BffUpdateChangePhoneRespDto();
  
  

  
  
return retData;
  }

    /**
   * B1-2退出登录[414]
   * gen by moon at 12/21/2023, 12:58:01 AM
   */
    @Trace(operationName = "B1-2退出登录")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffLogoutRespDto logout(BffLogoutReqDto reqDto){


        ImplementAuthLoginOutComRespDto implementAuthLoginOutComRespDto_1 = null;
QueryObtainUnifiedAuthenticationLoginInformationDetailComRespDto queryObtainUnifiedAuthenticationLoginInformationDetailComRespDto_1 =null;
       //virtualUsage D-Redis清空用户信息  48475
        // TODO: 2023/9/14
      com.wicket.okrframework.integration.dto.ClearUserInfoFromRedisRespDto clearUserInfoFromRedisRespDto = null;
    com.wicket.okrframework.integration.dto.ClearUserInfoFromRedisReqDto clearUserInfoFromRedisReqDto=new com.wicket.okrframework.integration.dto.ClearUserInfoFromRedisReqDto();
  clearUserInfoFromRedisReqDto.setOriginalRoleMemberId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecOriginalRoleMemberId());//CURRENT_ORIGINAL_ROLE_MEMBERID//sourceId:51184_1_48475

    /*D-Redis清空用户信息[1710]   */
  
      clearUserInfoFromRedisRespDto = fwBaseDivineDataClient.clearUserInfoFromRedis(clearUserInfoFromRedisReqDto).getData()/*vcase invoke 跨dubbo调用;*/;



//virtualUsage D-Redis清空用户Token(公共)  48479
        // TODO: 2023/9/14
      com.wicket.okrframework.integration.dto.ClearTokenFromRedisRespDto clearTokenFromRedisRespDto = null;
    com.wicket.okrframework.integration.dto.ClearTokenFromRedisReqDto clearTokenFromRedisReqDto=new com.wicket.okrframework.integration.dto.ClearTokenFromRedisReqDto();
  clearTokenFromRedisReqDto.setOriginalRoleMemberId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecOriginalRoleMemberId());//CURRENT_ORIGINAL_ROLE_MEMBERID//sourceId:51170_1_48479

    /*D-Redis清空用户Token(公共)[1698]   */

      clearTokenFromRedisRespDto = fwBaseDivineDataClient.clearTokenFromRedis(clearTokenFromRedisReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


    
//virtualUsage D1获取空间三方鉴权配置信息(公共)  48480
      ObtainSpaceThirdPartyAuthenticationConfInfoComRespDto obtainSpaceThirdPartyAuthenticationConfInfoComRespDto = null;
    ObtainSpaceThirdPartyAuthenticationConfInfoComReqDto obtainSpaceThirdPartyAuthenticationConfInfoComReqDto=new ObtainSpaceThirdPartyAuthenticationConfInfoComReqDto();

        obtainSpaceThirdPartyAuthenticationConfInfoComReqDto.setDnsAddresses(CommonFunctionHelper.getSessionUrl());
    /*D1获取空间三方鉴权配置信息(公共)[7379]   */
    Assert.isNull(obtainSpaceThirdPartyAuthenticationConfInfoComReqDto.getDnsAddresses(),"B1-2退出登录-D1获取空间三方鉴权配置信息(公共)-域名地址不能为空",false);
      obtainSpaceThirdPartyAuthenticationConfInfoComRespDto = fwBaseUserClient.obtainSpaceThirdPartyAuthenticationConfInfoCom(obtainSpaceThirdPartyAuthenticationConfInfoComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;




if((obtainSpaceThirdPartyAuthenticationConfInfoComRespDto!= null&& obtainSpaceThirdPartyAuthenticationConfInfoComRespDto.getEndValue() != null &&!(obtainSpaceThirdPartyAuthenticationConfInfoComRespDto!= null&&  obtainSpaceThirdPartyAuthenticationConfInfoComRespDto.getEndValue() !=null && obtainSpaceThirdPartyAuthenticationConfInfoComRespDto.getEndValue().equals("DISABLE")))) {
        //if((D1获取空间三方鉴权配置信息(公共).统一认证接入类型 值不等于空  and D1获取空间三方鉴权配置信息(公共).统一认证接入类型 不等于 不启用))  48483
    
ImplementAuthLoginOutComRespDto implementAuthLoginOutComRespDto = null;
    if(obtainSpaceThirdPartyAuthenticationConfInfoComRespDto !=null){
          ImplementAuthLoginOutComReqDto implementAuthLoginOutComReqDto=new ImplementAuthLoginOutComReqDto();
  if(obtainSpaceThirdPartyAuthenticationConfInfoComRespDto!=null){
      implementAuthLoginOutComReqDto.setAuthLogoutUrl(obtainSpaceThirdPartyAuthenticationConfInfoComRespDto.getAuthLogoutUrl());//SimpleFieldAssign//sourceId:1120241_1_48484
implementAuthLoginOutComReqDto.setAuthLoginUrl(obtainSpaceThirdPartyAuthenticationConfInfoComRespDto.getAuthLoginUrl());//SimpleFieldAssign//sourceId:1120242_1_48484
    }
      
    /*D1执行统一认证退出登录(公共)[7382]   */
    Assert.isNull(implementAuthLoginOutComReqDto.getAuthLogoutUrl(),"B1-2退出登录-D1执行统一认证退出登录(公共)-认证中心登出地址不能为空",false);
Assert.isNull(implementAuthLoginOutComReqDto.getAuthLoginUrl(),"B1-2退出登录-D1执行统一认证退出登录(公共)-认证中心登录地址不能为空",false);
      implementAuthLoginOutComRespDto = fwBaseUserClient.implementAuthLoginOutCom(implementAuthLoginOutComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;

        implementAuthLoginOutComRespDto_1 = implementAuthLoginOutComRespDto;
           }
QueryObtainUnifiedAuthenticationLoginInformationDetailComRespDto queryObtainUnifiedAuthenticationLoginInformationDetailComRespDto = null;
    if(obtainSpaceThirdPartyAuthenticationConfInfoComRespDto !=null){
          QueryObtainUnifiedAuthenticationLoginInformationDetailComReqDto queryObtainUnifiedAuthenticationLoginInformationDetailComReqDto=new QueryObtainUnifiedAuthenticationLoginInformationDetailComReqDto();
  if(obtainSpaceThirdPartyAuthenticationConfInfoComRespDto!=null){
      queryObtainUnifiedAuthenticationLoginInformationDetailComReqDto.setAuthLoginUrl(obtainSpaceThirdPartyAuthenticationConfInfoComRespDto.getAuthLogoutUrl()!=null?String.valueOf(obtainSpaceThirdPartyAuthenticationConfInfoComRespDto.getAuthLogoutUrl()):"");//SimpleFieldAssign//sourceId:1430409_1_57059
queryObtainUnifiedAuthenticationLoginInformationDetailComReqDto.setAppCallBackUrl(obtainSpaceThirdPartyAuthenticationConfInfoComRespDto.getAppCallBackUrl());//SimpleFieldAssign//sourceId:1430410_1_57059
    }

    /*D1拼第三方统一认证的登录地址[8175]   */
    Assert.isNull(queryObtainUnifiedAuthenticationLoginInformationDetailComReqDto.getAuthLoginUrl(),"B1-2退出登录-D1拼第三方统一认证的登录地址-认证中心登录地址不能为空",false);
Assert.isNull(queryObtainUnifiedAuthenticationLoginInformationDetailComReqDto.getAppCallBackUrl(),"B1-2退出登录-D1拼第三方统一认证的登录地址-应用回调地址不能为空",false);
      queryObtainUnifiedAuthenticationLoginInformationDetailComRespDto = fwBaseUserClient.queryObtainUnifiedAuthenticationLoginInformationDetailCom(queryObtainUnifiedAuthenticationLoginInformationDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


      queryObtainUnifiedAuthenticationLoginInformationDetailComRespDto_1 = queryObtainUnifiedAuthenticationLoginInformationDetailComRespDto;
           }
      }
BffLogoutRespDto retData = new BffLogoutRespDto();
if(implementAuthLoginOutComRespDto_1!=null){
      retData.setAuthLoginUrl(implementAuthLoginOutComRespDto_1.getAuthLoginUrl());//SimpleFieldAssign//sourceId:1120922_1
}
if(queryObtainUnifiedAuthenticationLoginInformationDetailComRespDto_1!=null){
      retData.setSplicingAuthAddresses(queryObtainUnifiedAuthenticationLoginInformationDetailComRespDto_1.getSplicingAuthAddresses());//SimpleFieldAssign//sourceId:1430412_1
    }
  

  
  
return retData;
  }

    /**
   * B1-2修改个人资料[412]
   * gen by moon at 8/10/2022, 3:29:19 AM
   */
    @Trace(operationName = "B1-2修改个人资料")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffUpdateUserInfoRespDto updateUserInfo(BffUpdateUserInfoReqDto reqDto){
      
       
       //步骤0: D1-2修改个人资料 - updateUserInfo
     UpdateUserInfoRespDto updateUserInfoRespDto = null;
    UpdateUserInfoReqDto updateUserInfoReqDto=new UpdateUserInfoReqDto();
  if(reqDto!=null){
      updateUserInfoReqDto.setPersonalDataId(reqDto.getPersonalDataId());//sourceId:24903_1
updateUserInfoReqDto.setIdCardName(reqDto.getIdCardName());//sourceId:24904_1
updateUserInfoReqDto.setNickName(reqDto.getNickName());//sourceId:24905_1
updateUserInfoReqDto.setUserFace(reqDto.getUserFace());//sourceId:24906_1
updateUserInfoReqDto.setSex(reqDto.getSex());//sourceId:24907_1
updateUserInfoReqDto.setBirthday(reqDto.getBirthday());//sourceId:24908_1
updateUserInfoReqDto.setCity(reqDto.getCity());//sourceId:24909_1
updateUserInfoReqDto.setUserIntro(reqDto.getUserIntro());//sourceId:47088_1
    }
  
    /*D1-2修改个人资料[410]   */
    Assert.isNull(updateUserInfoReqDto.getPersonalDataId(),"B1-2修改个人资料-D1-2修改个人资料-个人资料记录ID不能为空",false);
      updateUserInfoRespDto = fwBaseUserClient.updateUserInfo(updateUserInfoReqDto).getData();
      
      
    
//步骤1: D1-2查询个人资料详情 - queryUserInfoDetail
     QueryUserInfoDetailRespDto queryUserInfoDetailRespDto = null;
    QueryUserInfoDetailReqDto queryUserInfoDetailReqDto=new QueryUserInfoDetailReqDto();
  if(reqDto!=null){
      queryUserInfoDetailReqDto.setPersonalDataId(reqDto.getPersonalDataId());//sourceId:51422_1
    }
  
    /*D1-2查询个人资料详情[408]   */
    
      queryUserInfoDetailRespDto = fwBaseUserClient.queryUserInfoDetail(queryUserInfoDetailReqDto).getData();
      
      
    
//步骤2: D1-2查询身份人员列表 - queryBeginMemberList
     QueryBeginMemberListRespDto queryBeginMemberListRespDto = null;
    if(queryUserInfoDetailRespDto !=null){
          QueryBeginMemberListReqDto queryBeginMemberListReqDto=new QueryBeginMemberListReqDto();
  if(queryUserInfoDetailRespDto!=null){
      queryBeginMemberListReqDto.setUserId(queryUserInfoDetailRespDto.getUserId());//sourceId:51365_1
    }
  
    /*D1-2查询身份人员列表[988]   */
    
      queryBeginMemberListRespDto = fwBaseMemberClient.queryBeginMemberList(queryBeginMemberListReqDto).getData();
      
      
           }
    
//步骤3: Redis批量清空用户信息 - batchClearUserInfoFromRedis
     //ModelCode: batchClearUserInfoFromRedis
        BatchClearUserInfoFromRedisRespDto batchClearUserInfoFromRedisRes = null;
    if(queryBeginMemberListRespDto !=null){
          BatchClearUserInfoFromRedisReqDto batchClearUserInfoFromRedisReq=new BatchClearUserInfoFromRedisReqDto();
  if(queryBeginMemberListRespDto!=null){
      batchClearUserInfoFromRedisReq.setBeginMemberList(queryBeginMemberListRespDto.getBeginMemberList().stream().map(item->item.getOriginalRoleMemberId())
        .collect(Collectors.toList()));//sourceId:51368_1
    }
  
    /*Redis批量清空用户信息[1713]  入参身份ID数据集，清除用户就职信息缓存 */
    
      batchClearUserInfoFromRedisRes = nbUser.batchClearUserInfoFromRedis(batchClearUserInfoFromRedisReq);
      
      
           }
    
BffUpdateUserInfoRespDto retData = new BffUpdateUserInfoRespDto();
  
  

  
  
return retData;
  }

    /**
   * B1-2查询账号安全信息列表[1042]
   * gen by moon at 8/10/2022, 3:31:51 AM
   */
    @Trace(operationName = "B1-2查询账号安全信息列表")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryAccountSecurityListRespDto queryAccountSecurityList(BffQueryAccountSecurityListReqDto reqDto){
      
       
       QueryUserDetailRespDto queryUserDetailRespDto_1 = null;
QueryUsersUnionDetailRespDto queryUsersUnionDetailRespDto_1 = null;
//步骤0: D1-2查询个人账号详情 - queryUserDetail
     QueryUserDetailRespDto queryUserDetailRespDto = null;
    QueryUserDetailReqDto queryUserDetailReqDto=new QueryUserDetailReqDto();
  queryUserDetailReqDto.setUserId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecUserId());//CURRENT_USERID//sourceId:30308_1
  
    /*D1-2查询个人账号详情[1032] 返回密码有值就表示密码已经设置，无值显示请设密码；手机返回值加密4位。  */
    Assert.isNull(queryUserDetailReqDto.getUserId(),"B1-2查询账号安全信息列表-D1-2查询个人账号详情-个人账号不能为空",false);
      queryUserDetailRespDto = fwBaseUserClient.queryUserDetail(queryUserDetailReqDto).getData();
      
      queryUserDetailRespDto_1 = queryUserDetailRespDto;
    
//步骤1: D1-2查询联盟用户列表 - queryUsersUnionDetail
     QueryUsersUnionDetailRespDto queryUsersUnionDetailRespDto = null;
    QueryUsersUnionDetailReqDto queryUsersUnionDetailReqDto=new QueryUsersUnionDetailReqDto();
  queryUsersUnionDetailReqDto.setUserId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecUserId());//CURRENT_USERID//sourceId:24918_1
  
    /*D1-2查询联盟用户信息（内外应用）[423] 通过入参个人账号ID，查询内容应用的枚举值，通过返回的枚举值（联盟应用对象id / unionAppObjectId）映射前端缓存的编码中文，预先前端固化图标。  */
    Assert.isNull(queryUsersUnionDetailReqDto.getUserId(),"B1-2查询账号安全信息列表-D1-2查询联盟用户信息（内外应用）-个人账号不能为空",false);
      queryUsersUnionDetailRespDto = fwBaseUserClient.queryUsersUnionDetail(queryUsersUnionDetailReqDto).getData();
      
      queryUsersUnionDetailRespDto_1 = queryUsersUnionDetailRespDto;
    
BffQueryAccountSecurityListRespDto retData = new BffQueryAccountSecurityListRespDto();
  if(queryUserDetailRespDto_1!=null){
      retData.setPhone(queryUserDetailRespDto_1.getPhone());//sourceId:30341_1
retData.setPassByPhone(queryUserDetailRespDto_1.getPassByPhone());//sourceId:30342_1
retData.setIsInvalid(queryUserDetailRespDto_1.getIsInvalid());//sourceId:30343_1
    }
if(queryUsersUnionDetailRespDto_1!=null){
      retData.setUsersUnionList(queryUsersUnionDetailRespDto_1.getUsersUnionList().stream().map(item -> BeanUtil.toBean(item, BffUsersUnionDto.class)).collect(Collectors.toList()));//sourceId:39578_1
    }
  

  
  
return retData;
  }

    /**
   * B1-2首次登录完善个人资料[482]
   * gen by moon at 12/22/2023, 3:02:58 PM
   */
    @Trace(operationName = "B1-2首次登录完善个人资料")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffUpdateRenewUserInfoRespDto updateRenewUserInfo(BffUpdateRenewUserInfoReqDto reqDto){
      
       
       AddRenewUserInfoRespDto addRenewUserInfoRespDto_1 =null;
//步骤0: D1-2首次登录完善个人资料 - addRenewUserInfo
     AddRenewUserInfoRespDto addRenewUserInfoRespDto = null;
    AddRenewUserInfoReqDto addRenewUserInfoReqDto=new AddRenewUserInfoReqDto();
  addRenewUserInfoReqDto.setIsUserInfoDone("TRUE");//sourceId:21512_1
if(reqDto!=null){
      addRenewUserInfoReqDto.setUserName(reqDto.getUserName());//SimpleFieldAssign//sourceId:21509_1
addRenewUserInfoReqDto.setPhone(reqDto.getPhone());//SimpleFieldAssign//sourceId:21510_1
addRenewUserInfoReqDto.setPassByPhone(reqDto.getPassByPhone());//SimpleFieldAssign//sourceId:21511_1
addRenewUserInfoReqDto.setIdCardName(reqDto.getIdCardName());//SimpleFieldAssign//sourceId:21513_1
addRenewUserInfoReqDto.setUserFace(reqDto.getUserFace());//SimpleFieldAssign//sourceId:21514_1
addRenewUserInfoReqDto.setSex(reqDto.getSex());//SimpleFieldAssign//sourceId:21515_1
addRenewUserInfoReqDto.setBirthday(reqDto.getBirthday());//SimpleFieldAssign//sourceId:21516_1
addRenewUserInfoReqDto.setVerificationCode(reqDto.getVerificationCode());//SimpleFieldAssign//sourceId:47305_1
addRenewUserInfoReqDto.setPassword(reqDto.getPassword());//SimpleFieldAssign//sourceId:203198_1
addRenewUserInfoReqDto.setMyPwdProblem(reqDto.getMyPwdProblem());//SimpleFieldAssign//sourceId:203199_1
addRenewUserInfoReqDto.setMyPwdAnswer(reqDto.getMyPwdAnswer());//SimpleFieldAssign//sourceId:203200_1
    }
  
    /*D1-2首次登录完善个人资料[481]   */
    Assert.isNull(addRenewUserInfoReqDto.getUserName(),"B1-2首次登录完善个人资料-D1-2首次登录完善个人资料-用户名不能为空",false);
Assert.isNull(addRenewUserInfoReqDto.getPhone(),"B1-2首次登录完善个人资料-D1-2首次登录完善个人资料-绑定手机不能为空",false);
Assert.isNull(addRenewUserInfoReqDto.getIsUserInfoDone(),"B1-2首次登录完善个人资料-D1-2首次登录完善个人资料-个人资料是否完善不能为空",false);
Assert.isNull(addRenewUserInfoReqDto.getIdCardName(),"B1-2首次登录完善个人资料-D1-2首次登录完善个人资料-真实姓名不能为空",false);
Assert.isNull(addRenewUserInfoReqDto.getUserFace(),"B1-2首次登录完善个人资料-D1-2首次登录完善个人资料-真实头像不能为空",false);
Assert.isNull(addRenewUserInfoReqDto.getSex(),"B1-2首次登录完善个人资料-D1-2首次登录完善个人资料-用户性别不能为空",false);
      addRenewUserInfoRespDto = fwBaseUserClient.addRenewUserInfo(addRenewUserInfoReqDto).getData()/*vcase invoke 跨dubbo调用;*/;
      
      
      addRenewUserInfoRespDto_1 = addRenewUserInfoRespDto;
    
//步骤1: D-Redis清空用户信息 - clearUserInfoFromRedis
     //ModelCode: clearUserInfoFromRedis
        ClearUserInfoFromRedisRespDto clearUserInfoFromRedisRes = null;
    ClearUserInfoFromRedisReqDto clearUserInfoFromRedisReq=new ClearUserInfoFromRedisReqDto();
  clearUserInfoFromRedisReq.setOriginalRoleMemberId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecOriginalRoleMemberId());//CURRENT_ORIGINAL_ROLE_MEMBERID//sourceId:63925_1
  
    /*D-Redis清空用户信息[1710]  清除用户缓存，不用重新登录，通过token重新获取 */
    Assert.isNull(clearUserInfoFromRedisReq.getOriginalRoleMemberId(),"B1-2首次登录完善个人资料-D-Redis清空用户信息-身份人员ID不能为空",false);
      clearUserInfoFromRedisRes = nbUser.clearUserInfoFromRedis(clearUserInfoFromRedisReq);
      
      
      
    
BffUpdateRenewUserInfoRespDto retData = new BffUpdateRenewUserInfoRespDto();
  if(addRenewUserInfoRespDto_1!=null){
      retData.setPersonalDataId(addRenewUserInfoRespDto_1.getPersonalDataId());//SimpleFieldAssign//sourceId:30064_1
    }
  

  
  
return retData;
  }

    /**
   * B1-2查询个人信息详情[404]
   * gen by moon at 8/10/2022, 3:29:13 AM
   */
    @Trace(operationName = "B1-2查询个人信息详情")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryPersonalInformationDetailRespDto queryPersonalInformationDetail(BffQueryPersonalInformationDetailReqDto reqDto){
      
       
       QueryPersonalInformationDetailRespDto queryPersonalInformationDetailRespDto_1 = null;
//步骤0: D1-2查询个人信息详情 - queryPersonalInformationDetail
     QueryPersonalInformationDetailRespDto queryPersonalInformationDetailRespDto = null;
    QueryPersonalInformationDetailReqDto queryPersonalInformationDetailReqDto=new QueryPersonalInformationDetailReqDto();
  queryPersonalInformationDetailReqDto.setUserId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecUserId());//CURRENT_USERID//sourceId:30587_1
  
    /*D1-2查询个人信息详情[398]   */
    Assert.isNull(queryPersonalInformationDetailReqDto.getUserId(),"B1-2查询个人信息详情-D1-2查询个人信息详情-个人账号不能为空",false);
      queryPersonalInformationDetailRespDto = fwBaseUserClient.queryPersonalInformationDetail(queryPersonalInformationDetailReqDto).getData();
      
      queryPersonalInformationDetailRespDto_1 = queryPersonalInformationDetailRespDto;
    
BffQueryPersonalInformationDetailRespDto retData = new BffQueryPersonalInformationDetailRespDto();
  if(queryPersonalInformationDetailRespDto_1!=null){
      retData.setPersonalDataId(queryPersonalInformationDetailRespDto_1.getPersonalDataId());//sourceId:63601_1
retData.setUserId(queryPersonalInformationDetailRespDto_1.getUserId());//sourceId:30621_1
retData.setUserName(queryPersonalInformationDetailRespDto_1.getUserName());//sourceId:30622_1
retData.setEmail(queryPersonalInformationDetailRespDto_1.getEmail());//sourceId:30623_1
retData.setPassByEmail(queryPersonalInformationDetailRespDto_1.getPassByEmail());//sourceId:30624_1
retData.setPhone(queryPersonalInformationDetailRespDto_1.getPhone());//sourceId:30625_1
retData.setPassByPhone(queryPersonalInformationDetailRespDto_1.getPassByPhone());//sourceId:30626_1
retData.setUserFace(queryPersonalInformationDetailRespDto_1.getUserFace());//sourceId:30627_1
retData.setIdCardName(queryPersonalInformationDetailRespDto_1.getIdCardName());//sourceId:30628_1
retData.setNickName(queryPersonalInformationDetailRespDto_1.getNickName());//sourceId:30629_1
retData.setUserIntro(queryPersonalInformationDetailRespDto_1.getUserIntro());//sourceId:30630_1
retData.setSex(queryPersonalInformationDetailRespDto_1.getSex());//sourceId:30631_1
retData.setBirthday(queryPersonalInformationDetailRespDto_1.getBirthday());//sourceId:30632_1
retData.setCity(queryPersonalInformationDetailRespDto_1.getCity());//sourceId:30633_1
    }
  

  
  
return retData;
  }
/**
   * B1-查询用户登录信息（非Redis）[4161]
   * gen by moon at 8/31/2024, 8:40:38 PM
   */
    @Trace(operationName = "B1-查询用户登录信息（非Redis）")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryUserInfoByLoginDetailRespDto queryUserInfoByLoginDetail(BffQueryUserInfoByLoginDetailReqDto reqDto){
      
       
       QueryUserInfoByLoginDetailRespDto queryUserInfoByLoginDetailRespDto_1 =null;
QueryRoleOfPowerListComRespDto queryRoleOfPowerListComRespDto_1 =null;
//步骤0: D1-查询用户登录信息（非Redis） - queryUserInfoByLoginDetail
     QueryUserInfoByLoginDetailRespDto queryUserInfoByLoginDetailRespDto = null;
    QueryUserInfoByLoginDetailReqDto queryUserInfoByLoginDetailReqDto=new QueryUserInfoByLoginDetailReqDto();
  queryUserInfoByLoginDetailReqDto.setUserId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecUserId());//CURRENT_USERID//sourceId:254038_1
  
    /*D1-查询用户登录信息（非Redis）[4160]   */
    Assert.isNull(queryUserInfoByLoginDetailReqDto.getUserId(),"B1-查询用户登录信息（非Redis）-D1-查询用户登录信息（非Redis）-个人账号不能为空",false);
      queryUserInfoByLoginDetailRespDto = fwBaseUserClient.queryUserInfoByLoginDetail(queryUserInfoByLoginDetailReqDto).getData()/*vcase invoke 跨dubbo调用;*/;
      
      
      queryUserInfoByLoginDetailRespDto_1 = queryUserInfoByLoginDetailRespDto;
    
//步骤1: D1查询用于权限角色列表(公共) - queryRoleOfPowerListCom
     QueryRoleOfPowerListComRespDto queryRoleOfPowerListComRespDto = null;
    QueryRoleOfPowerListComReqDto queryRoleOfPowerListComReqDto=new QueryRoleOfPowerListComReqDto();
  queryRoleOfPowerListComReqDto.setOriginalRoleMemberId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecOriginalRoleMemberId());//CURRENT_ORIGINAL_ROLE_MEMBERID//sourceId:1993012_1
queryRoleOfPowerListComReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:1993014_1

    /*D1查询用于权限角色列表(公共)[2189]   */
    Assert.isNull(queryRoleOfPowerListComReqDto.getOriginalRoleMemberId(),"B1-查询用户登录信息（非Redis）-D1查询用于权限角色列表(公共)-身份人员ID不能为空",false);
Assert.isNull(queryRoleOfPowerListComReqDto.getSubjectLifeCycle(),"B1-查询用户登录信息（非Redis）-D1查询用于权限角色列表(公共)-主体生命周期不能为空",false);
      queryRoleOfPowerListComRespDto = fwBaseRoleClient.queryRoleOfPowerListCom(queryRoleOfPowerListComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


      queryRoleOfPowerListComRespDto_1 = queryRoleOfPowerListComRespDto;

BffQueryUserInfoByLoginDetailRespDto retData = new BffQueryUserInfoByLoginDetailRespDto();
  if(queryUserInfoByLoginDetailRespDto_1!=null){
      retData.setOrgInductionRecordList(queryUserInfoByLoginDetailRespDto_1.getOrgInductionRecordList().stream().map(item -> BeanUtil.toBean(item, BffOrgInductionRecordDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:254044_1
retData.setUserId(queryUserInfoByLoginDetailRespDto_1.getUserId());//SimpleFieldAssign//sourceId:254046_1
retData.setMemberId(queryUserInfoByLoginDetailRespDto_1.getMemberId());//SimpleFieldAssign//sourceId:355688_1
retData.setOriginalRoleMemberId(queryUserInfoByLoginDetailRespDto_1.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:355687_1
retData.setRoleMemberCode(queryUserInfoByLoginDetailRespDto_1.getRoleMemberCode());//SimpleFieldAssign//sourceId:254049_1
retData.setPositionIdName(queryUserInfoByLoginDetailRespDto_1.getPositionIdName());//SimpleFieldAssign//sourceId:254050_1
retData.setUserName(queryUserInfoByLoginDetailRespDto_1.getUserName());//SimpleFieldAssign//sourceId:254051_1
retData.setPhone(queryUserInfoByLoginDetailRespDto_1.getPhone());//SimpleFieldAssign//sourceId:254052_1
retData.setPassByPhone(queryUserInfoByLoginDetailRespDto_1.getPassByPhone());//SimpleFieldAssign//sourceId:254053_1
retData.setIsUserInfoDone(queryUserInfoByLoginDetailRespDto_1.getIsUserInfoDone());//SimpleFieldAssign//sourceId:254054_1
retData.setIdCardName(queryUserInfoByLoginDetailRespDto_1.getIdCardName());//SimpleFieldAssign//sourceId:254055_1
retData.setUserFace(queryUserInfoByLoginDetailRespDto_1.getUserFace());//SimpleFieldAssign//sourceId:254056_1
retData.setNickName(queryUserInfoByLoginDetailRespDto_1.getNickName());//SimpleFieldAssign//sourceId:254057_1
retData.setSex(queryUserInfoByLoginDetailRespDto_1.getSex());//SimpleFieldAssign//sourceId:254058_1
retData.setBirthday(queryUserInfoByLoginDetailRespDto_1.getBirthday());//SimpleFieldAssign//sourceId:254059_1
retData.setCity(queryUserInfoByLoginDetailRespDto_1.getCity());//SimpleFieldAssign//sourceId:254060_1
retData.setMyPwdProblem(queryUserInfoByLoginDetailRespDto_1.getMyPwdProblem());//SimpleFieldAssign//sourceId:254061_1
retData.setMyPwdAnswer(queryUserInfoByLoginDetailRespDto_1.getMyPwdAnswer());//SimpleFieldAssign//sourceId:254062_1
retData.setRoleId(queryUserInfoByLoginDetailRespDto_1.getRoleId());//SimpleFieldAssign//sourceId:258824_1
retData.setRoleCode(queryUserInfoByLoginDetailRespDto_1.getRoleCode());//SimpleFieldAssign//sourceId:258825_1
retData.setRoleName(queryUserInfoByLoginDetailRespDto_1.getRoleName());//SimpleFieldAssign//sourceId:258826_1
    }
if(queryRoleOfPowerListComRespDto_1!=null){
      retData.setRoleRelList(queryRoleOfPowerListComRespDto_1.getRoleRelList().stream().map(item -> BeanUtil.toBean(item, BffRoleRelDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1993015_1
    }
  

  
  
return retData;
  }
/**
   * B3登录V2[4194]
   * gen by moon at 4/1/2024, 2:14:00 AM
   */
    @Trace(operationName = "B3登录V2")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffLogUserinRespDto LogUserin(BffLogUserinReqDto reqDto){
      
       
       ImplementSignIncheckProcessingDataComRespDto implementSignIncheckProcessingDataComRespDto_1 =null;
if((reqDto!= null&& reqDto.getPassword() == null &&reqDto!= null&& reqDto.getPhone() != null )) {
        //if((登录V2.密码 值等于空  and 登录V2.绑定手机 值不等于空 ))  14654
        
QueryAppforLoginDetailComRespDto queryAppforLoginDetailComRespDto = null;
    QueryAppforLoginDetailComReqDto queryAppforLoginDetailComReqDto=new QueryAppforLoginDetailComReqDto();
  if(reqDto!=null){
      queryAppforLoginDetailComReqDto.setPhone(reqDto.getPhone());//SimpleFieldAssign//sourceId:259452_1_14715
queryAppforLoginDetailComReqDto.setRoleMemberCode(reqDto.getRoleMemberCode());//SimpleFieldAssign//sourceId:259453_1_14715
queryAppforLoginDetailComReqDto.setUserName(reqDto.getUserName());//SimpleFieldAssign//sourceId:259454_1_14715
queryAppforLoginDetailComReqDto.setPassword(reqDto.getPassword());//SimpleFieldAssign//sourceId:259455_1_14715
queryAppforLoginDetailComReqDto.setVerificationCode(reqDto.getVerificationCode());//SimpleFieldAssign//sourceId:259456_1_14715
queryAppforLoginDetailComReqDto.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:1683731_1_14715
    }
  
    /*D1-2查询联盟应用登录用详情(公共)[4201]   */
    
      queryAppforLoginDetailComRespDto = fwBaseBaseClient.queryAppforLoginDetailCom(queryAppforLoginDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;
      
      
      
com.wicket.okrframework.integration.dto.CheckCaptchaValidRespDto checkCaptchaValidRespDto = null;
    CheckCaptchaValidReqDto checkCaptchaValidReqDto=new CheckCaptchaValidReqDto();
  
  
    /*D1-检测验证码是否有效（特殊方法）[1185]   */
    Assert.isNull(checkCaptchaValidReqDto.getPhone(),"B3登录V2-D1-检测验证码是否有效（特殊方法）-手机号不能为空",false);
Assert.isNull(checkCaptchaValidReqDto.getVerificationCode(),"B3登录V2-D1-检测验证码是否有效（特殊方法）-验证码不能为空",false);
      checkCaptchaValidRespDto = fwBaseCaptchaClient.checkCaptchaValid(checkCaptchaValidReqDto).getData()/*vcase invoke 跨dubbo调用;*/;
      
      
      
if((checkCaptchaValidRespDto!= null&&  checkCaptchaValidRespDto.getIsInvalid() !=null && checkCaptchaValidRespDto.getIsInvalid().equals("TRUE"))) {
        //if(D1-手机验证码验证.是否有效 等于 是)  14657
        
ImplementSignIncheckProcessingDataComRespDto implementSignIncheckProcessingDataComRespDto = null;
    if(queryAppforLoginDetailComRespDto !=null){
          ImplementSignIncheckProcessingDataComReqDto implementSignIncheckProcessingDataComReqDto=new ImplementSignIncheckProcessingDataComReqDto();
  if(reqDto!=null){
      implementSignIncheckProcessingDataComReqDto.setUserName(reqDto.getUserName());//SimpleFieldAssign//sourceId:259045_1_14658
implementSignIncheckProcessingDataComReqDto.setPhone(reqDto.getPhone());//SimpleFieldAssign//sourceId:259046_1_14658
implementSignIncheckProcessingDataComReqDto.setPassword(reqDto.getPassword());//SimpleFieldAssign//sourceId:259047_1_14658
    }
if(queryAppforLoginDetailComRespDto!=null){
      implementSignIncheckProcessingDataComReqDto.setSpaceId(queryAppforLoginDetailComRespDto.getUniqueSpaceId());//SimpleFieldAssign//sourceId:259049_1_14658
    }
  
    /*D1执行登录验证处理数据(公共)[4195]   */
    Assert.isNull(implementSignIncheckProcessingDataComReqDto.getSpaceId(),"B3登录V2-D1执行登录验证处理数据(公共)-创建于空间ID不能为空",false);
      implementSignIncheckProcessingDataComRespDto = fwBaseUserClient.implementSignIncheckProcessingDataCom(implementSignIncheckProcessingDataComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;
      
      
      implementSignIncheckProcessingDataComRespDto_1 = implementSignIncheckProcessingDataComRespDto;
           }
//processBranchName:正常结束 ,processBranchId:14659
        
      }
else{
       //else  14660
      
//异常结束 14661
      throw new BizException("C00006","对不起，验证码错误！",false);
    }
      }
else if((reqDto!= null&& reqDto.getPassword() != null &&reqDto!= null&& reqDto.getRoleMemberCode() != null )){
       //elseif((登录V2.密码 值不等于空  and 登录V2.身份人员编号 值不等于空 ))  14662
      
QueryAppforLoginDetailComRespDto queryAppforLoginDetailComRespDto_2 = null;
    QueryAppforLoginDetailComReqDto queryAppforLoginDetailComReqDto_1=new QueryAppforLoginDetailComReqDto();
  if(reqDto!=null){
      queryAppforLoginDetailComReqDto_1.setPhone(reqDto.getPhone());//SimpleFieldAssign//sourceId:259452_1_14716
queryAppforLoginDetailComReqDto_1.setRoleMemberCode(reqDto.getRoleMemberCode());//SimpleFieldAssign//sourceId:259453_1_14716
queryAppforLoginDetailComReqDto_1.setUserName(reqDto.getUserName());//SimpleFieldAssign//sourceId:259454_1_14716
queryAppforLoginDetailComReqDto_1.setPassword(reqDto.getPassword());//SimpleFieldAssign//sourceId:259455_1_14716
queryAppforLoginDetailComReqDto_1.setVerificationCode(reqDto.getVerificationCode());//SimpleFieldAssign//sourceId:259456_1_14716
queryAppforLoginDetailComReqDto_1.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:1683731_1_14716
    }
  
    /*D1-2查询联盟应用登录用详情(公共)[4201]   */
    
      queryAppforLoginDetailComRespDto_2 = fwBaseBaseClient.queryAppforLoginDetailCom(queryAppforLoginDetailComReqDto_1).getData()/*vcase invoke 跨dubbo调用;*/;
      
      
      
CheckLoginNumberRespDto checkLoginNumberRespDto = null;
    if(queryAppforLoginDetailComRespDto_2 !=null){
          CheckLoginNumberReqDto checkLoginNumberReqDto=new CheckLoginNumberReqDto();
  checkLoginNumberReqDto.setRoleCode("STAFF");//CUSTOM_CONVENTION//sourceId:258944_1_14664
if(reqDto!=null){
      checkLoginNumberReqDto.setRoleMemberCode(reqDto.getRoleMemberCode());//SimpleFieldAssign//sourceId:258943_1_14664
    }
if(queryAppforLoginDetailComRespDto_2!=null){
      checkLoginNumberReqDto.setSpaceId(queryAppforLoginDetailComRespDto_2.getUniqueSpaceId());//SimpleFieldAssign//sourceId:258945_1_14664
    }
  
    /*D1-工号信息验证(公共)[1192]   */
    Assert.isNull(checkLoginNumberReqDto.getRoleMemberCode(),"B3登录V2-D1-工号信息验证(公共)-身份人员编号不能为空",false);
Assert.isNull(checkLoginNumberReqDto.getRoleCode(),"B3登录V2-D1-工号信息验证(公共)-身份角色编码不能为空",false);
      checkLoginNumberRespDto = fwBaseUserClient.checkLoginNumber(checkLoginNumberReqDto).getData()/*vcase invoke 跨dubbo调用;*/;
      
      
      
           }
if((checkLoginNumberRespDto != null )) {
        //if(D1-工号信息验证.出参 值不等于空 )  14665
        
ImplementSignIncheckProcessingDataComRespDto implementSignIncheckProcessingDataComRespDto_2 = null;
    if(checkLoginNumberRespDto !=null&&queryAppforLoginDetailComRespDto_2 !=null){
          ImplementSignIncheckProcessingDataComReqDto implementSignIncheckProcessingDataComReqDto_1=new ImplementSignIncheckProcessingDataComReqDto();
  if(checkLoginNumberRespDto!=null){
      implementSignIncheckProcessingDataComReqDto_1.setUserId(checkLoginNumberRespDto.getUserId());//SimpleFieldAssign//sourceId:358928_1_14666
    }
if(reqDto!=null){
      implementSignIncheckProcessingDataComReqDto_1.setUserName(reqDto.getUserName());//SimpleFieldAssign//sourceId:259045_1_14666
implementSignIncheckProcessingDataComReqDto_1.setPhone(reqDto.getPhone());//SimpleFieldAssign//sourceId:259046_1_14666
implementSignIncheckProcessingDataComReqDto_1.setPassword(reqDto.getPassword());//SimpleFieldAssign//sourceId:259047_1_14666
    }
if(queryAppforLoginDetailComRespDto_2!=null){
      implementSignIncheckProcessingDataComReqDto_1.setSpaceId(queryAppforLoginDetailComRespDto_2.getUniqueSpaceId());//SimpleFieldAssign//sourceId:259049_1_14666
    }
  
    /*D1执行登录验证处理数据(公共)[4195]   */
    Assert.isNull(implementSignIncheckProcessingDataComReqDto_1.getSpaceId(),"B3登录V2-D1执行登录验证处理数据(公共)-创建于空间ID不能为空",false);
      implementSignIncheckProcessingDataComRespDto_2 = fwBaseUserClient.implementSignIncheckProcessingDataCom(implementSignIncheckProcessingDataComReqDto_1).getData()/*vcase invoke 跨dubbo调用;*/;
      
      
      implementSignIncheckProcessingDataComRespDto_1 = implementSignIncheckProcessingDataComRespDto_2;
           }
//processBranchName:正常结束 ,processBranchId:14667
        
      }
    }
else if((reqDto!= null&& reqDto.getUserName() != null ||reqDto!= null&& reqDto.getPhone() != null )&&(reqDto!= null&& reqDto.getPassword() != null )){
       //elseif((登录V2.用户名 值不等于空  or 登录V2.绑定手机 值不等于空 ) and 登录V2.密码 值不等于空 )  14668
      
QueryAppforLoginDetailComRespDto queryAppforLoginDetailComRespDto_3 = null;
    QueryAppforLoginDetailComReqDto queryAppforLoginDetailComReqDto_2=new QueryAppforLoginDetailComReqDto();
  if(reqDto!=null){
      queryAppforLoginDetailComReqDto_2.setPhone(reqDto.getPhone());//SimpleFieldAssign//sourceId:259452_1_14717
queryAppforLoginDetailComReqDto_2.setRoleMemberCode(reqDto.getRoleMemberCode());//SimpleFieldAssign//sourceId:259453_1_14717
queryAppforLoginDetailComReqDto_2.setUserName(reqDto.getUserName());//SimpleFieldAssign//sourceId:259454_1_14717
queryAppforLoginDetailComReqDto_2.setPassword(reqDto.getPassword());//SimpleFieldAssign//sourceId:259455_1_14717
queryAppforLoginDetailComReqDto_2.setVerificationCode(reqDto.getVerificationCode());//SimpleFieldAssign//sourceId:259456_1_14717
queryAppforLoginDetailComReqDto_2.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:1683731_1_14717
    }
  
    /*D1-2查询联盟应用登录用详情(公共)[4201]   */
    
      queryAppforLoginDetailComRespDto_3 = fwBaseBaseClient.queryAppforLoginDetailCom(queryAppforLoginDetailComReqDto_2).getData()/*vcase invoke 跨dubbo调用;*/;
      
      
      
ImplementSignIncheckProcessingDataComRespDto implementSignIncheckProcessingDataComRespDto_3 = null;
    if(queryAppforLoginDetailComRespDto_3 !=null){
          ImplementSignIncheckProcessingDataComReqDto implementSignIncheckProcessingDataComReqDto_2=new ImplementSignIncheckProcessingDataComReqDto();
  if(reqDto!=null){
      implementSignIncheckProcessingDataComReqDto_2.setUserName(reqDto.getUserName());//SimpleFieldAssign//sourceId:259045_1_14670
implementSignIncheckProcessingDataComReqDto_2.setPhone(reqDto.getPhone());//SimpleFieldAssign//sourceId:259046_1_14670
implementSignIncheckProcessingDataComReqDto_2.setPassword(reqDto.getPassword());//SimpleFieldAssign//sourceId:259047_1_14670
    }
if(queryAppforLoginDetailComRespDto_3!=null){
      implementSignIncheckProcessingDataComReqDto_2.setSpaceId(queryAppforLoginDetailComRespDto_3.getUniqueSpaceId());//SimpleFieldAssign//sourceId:259049_1_14670
    }
  
    /*D1执行登录验证处理数据(公共)[4195]   */
    Assert.isNull(implementSignIncheckProcessingDataComReqDto_2.getSpaceId(),"B3登录V2-D1执行登录验证处理数据(公共)-创建于空间ID不能为空",false);
      implementSignIncheckProcessingDataComRespDto_3 = fwBaseUserClient.implementSignIncheckProcessingDataCom(implementSignIncheckProcessingDataComReqDto_2).getData()/*vcase invoke 跨dubbo调用;*/;
      
      
      implementSignIncheckProcessingDataComRespDto_1 = implementSignIncheckProcessingDataComRespDto_3;
           }
//processBranchName:正常结束 ,processBranchId:14671
        
    }
BffLogUserinRespDto retData = new BffLogUserinRespDto();
  if(implementSignIncheckProcessingDataComRespDto_1!=null){
      retData.setToken(implementSignIncheckProcessingDataComRespDto_1.getToken());//SimpleFieldAssign//sourceId:259214_1
    }
  

  
  
return retData;
  }
/**
   * B1-2查询个人密保问题详情[4267]
   * gen by moon at 9/7/2022, 3:58:51 PM
   */
    @Trace(operationName = "B1-2查询个人密保问题详情")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryUserPwdProblemDetailRespDto queryUserPwdProblemDetail(BffQueryUserPwdProblemDetailReqDto reqDto){
      
       
       QueryUserPwdProblemDetailRespDto queryUserPwdProblemDetailRespDto_1 =null;
//步骤0: D1-2查询个人密保问题详情 - queryUserPwdProblemDetail
     QueryUserPwdProblemDetailRespDto queryUserPwdProblemDetailRespDto = null;
    QueryUserPwdProblemDetailReqDto queryUserPwdProblemDetailReqDto=new QueryUserPwdProblemDetailReqDto();
  if(reqDto!=null){
      queryUserPwdProblemDetailReqDto.setUserName(reqDto.getUserName());//sourceId:269848_1
queryUserPwdProblemDetailReqDto.setRoleMemberCode(reqDto.getRoleMemberCode());//sourceId:269849_1
queryUserPwdProblemDetailReqDto.setPhone(reqDto.getPhone());//sourceId:269850_1
    }
  
    /*D1-2查询个人密保问题详情[4268]   */
    
      queryUserPwdProblemDetailRespDto = fwBaseUserClient.queryUserPwdProblemDetail(queryUserPwdProblemDetailReqDto).getData();
      
      
      queryUserPwdProblemDetailRespDto_1 = queryUserPwdProblemDetailRespDto;
    
BffQueryUserPwdProblemDetailRespDto retData = new BffQueryUserPwdProblemDetailRespDto();
  if(queryUserPwdProblemDetailRespDto_1!=null){
      retData.setMyPwdProblem(queryUserPwdProblemDetailRespDto_1.getMyPwdProblem());//sourceId:269858_1
    }
  

  
  
return retData;
  }
/**
   * B1-2查询密保问题详情[3964]
   * gen by moon at 5/21/2023, 10:22:36 PM
   */
    @Trace(operationName = "B1-2查询密保问题详情")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryPwdProblemDetailRespDto queryPwdProblemDetail(BffQueryPwdProblemDetailReqDto reqDto){


       QueryUserPwdProblemDetailComRespDto queryUserPwdProblemDetailComRespDto_1 =null;
//步骤0: D1-2查询个人密保问题(公共) - queryUserPwdProblemDetailCom
     QueryUserPwdProblemDetailComRespDto queryUserPwdProblemDetailComRespDto = null;
    QueryUserPwdProblemDetailComReqDto queryUserPwdProblemDetailComReqDto=new QueryUserPwdProblemDetailComReqDto();
  if(reqDto!=null){
      queryUserPwdProblemDetailComReqDto.setUserName(reqDto.getUserName());//SimpleFieldAssign//sourceId:203317_1
queryUserPwdProblemDetailComReqDto.setRoleMemberCode(reqDto.getRoleMemberCode());//SimpleFieldAssign//sourceId:203318_1
queryUserPwdProblemDetailComReqDto.setPhone(reqDto.getPhone());//SimpleFieldAssign//sourceId:203319_1
    }

    /*D1-2查询个人密保问题(公共)[3963]   */

      queryUserPwdProblemDetailComRespDto = fwBaseUserClient.queryUserPwdProblemDetailCom(queryUserPwdProblemDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


      queryUserPwdProblemDetailComRespDto_1 = queryUserPwdProblemDetailComRespDto;

BffQueryPwdProblemDetailRespDto retData = new BffQueryPwdProblemDetailRespDto();
  if(queryUserPwdProblemDetailComRespDto_1!=null){
      retData.setMyPwdProblem(queryUserPwdProblemDetailComRespDto_1.getMyPwdProblem());//SimpleFieldAssign//sourceId:972415_1
    }




return retData;
  }
/**
   * B1查询个人资料详情(公共)[7041]
   * gen by moon at 6/1/2023, 2:52:18 AM
   */
    @Trace(operationName = "B1查询个人资料详情(公共)")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryUserInfoDetailComRespDto queryUserInfoDetailCom(BffQueryUserInfoDetailComReqDto reqDto){


       QueryUserInfoDetailComRespDto queryUserInfoDetailComRespDto_1 =null;
//步骤0: D1-2查询个人资料详情(公共) - queryUserInfoDetailCom
     QueryUserInfoDetailComRespDto queryUserInfoDetailComRespDto = null;
    QueryUserInfoDetailComReqDto queryUserInfoDetailComReqDto=new QueryUserInfoDetailComReqDto();
  queryUserInfoDetailComReqDto.setUserId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecUserId());//CURRENT_USERID//sourceId:996633_1

    /*D1-2查询个人资料详情(公共)[408]   */
    Assert.isNull(queryUserInfoDetailComReqDto.getUserId(),"B1查询个人资料详情(公共)-D1-2查询个人资料详情(公共)-账号不能为空",false);
      queryUserInfoDetailComRespDto = fwBaseUserClient.queryUserInfoDetailCom(queryUserInfoDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


      queryUserInfoDetailComRespDto_1 = queryUserInfoDetailComRespDto;

BffQueryUserInfoDetailComRespDto retData = new BffQueryUserInfoDetailComRespDto();
  if(queryUserInfoDetailComRespDto_1!=null){
      retData.setPersonalDataId(queryUserInfoDetailComRespDto_1.getPersonalDataId());//SimpleFieldAssign//sourceId:996644_1
retData.setUserId(queryUserInfoDetailComRespDto_1.getUserId());//SimpleFieldAssign//sourceId:996645_1
retData.setUserFace(queryUserInfoDetailComRespDto_1.getUserFace());//SimpleFieldAssign//sourceId:996646_1
retData.setIdCardName(queryUserInfoDetailComRespDto_1.getIdCardName());//SimpleFieldAssign//sourceId:996647_1
retData.setNickName(queryUserInfoDetailComRespDto_1.getNickName());//SimpleFieldAssign//sourceId:996648_1
retData.setSex(queryUserInfoDetailComRespDto_1.getSex());//SimpleFieldAssign//sourceId:996649_1
    }




return retData;
  }
/**
   * 登录V3[7386]
   * gen by moon at 9/12/2023, 8:13:00 PM
   */
    @Trace(operationName = "登录V3")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffImplementLoginRespDto implementLogin(BffImplementLoginReqDto reqDto){


       ImplementLoginComRespDto implementLoginComRespDto_1 =null;
//步骤0: D1-登录V3(公共) - implementLoginCom
     ImplementLoginComRespDto implementLoginComRespDto = null;
    ImplementLoginComReqDto implementLoginComReqDto=new ImplementLoginComReqDto();
  if(reqDto!=null){
      implementLoginComReqDto.setAuthTicket(reqDto.getAuthTicket());//SimpleFieldAssign//sourceId:1120282_1
    }

    /*D1-登录V3(公共)[7385]   */
    Assert.isNull(implementLoginComReqDto.getAuthTicket(),"登录V3-D1-登录V3(公共)-认证中心票证ticket不能为空",false);
      implementLoginComRespDto = fwBaseUserClient.implementLoginCom(implementLoginComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


      implementLoginComRespDto_1 = implementLoginComRespDto;

BffImplementLoginRespDto retData = new BffImplementLoginRespDto();
  if(implementLoginComRespDto_1!=null){
      retData.setToken(implementLoginComRespDto_1.getToken());//SimpleFieldAssign//sourceId:1120313_1
    }




return retData;
  }
/**
   * B1查询获取统一认证登录信息详情[8177]
   * gen by moon at 12/21/2023, 12:20:47 PM
   */
    @Trace(operationName = "B1查询获取统一认证登录信息详情")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffQueryObtainUnifiedAuthenticationLoginInformationDetailRespDto queryObtainUnifiedAuthenticationLoginInformationDetail(BffQueryObtainUnifiedAuthenticationLoginInformationDetailReqDto reqDto){


       ObtainSpaceThirdPartyAuthenticationConfInfoComRespDto obtainSpaceThirdPartyAuthenticationConfInfoComRespDto_1 =null;
QueryObtainUnifiedAuthenticationLoginInformationDetailComRespDto queryObtainUnifiedAuthenticationLoginInformationDetailComRespDto_1 =null;
//virtualUsage D1获取空间三方鉴权配置信息(公共)  57078
     ObtainSpaceThirdPartyAuthenticationConfInfoComRespDto obtainSpaceThirdPartyAuthenticationConfInfoComRespDto = null;
    ObtainSpaceThirdPartyAuthenticationConfInfoComReqDto obtainSpaceThirdPartyAuthenticationConfInfoComReqDto=new ObtainSpaceThirdPartyAuthenticationConfInfoComReqDto();
  obtainSpaceThirdPartyAuthenticationConfInfoComReqDto.setDnsAddresses(CommonFunctionHelper.getSessionUrl());//ACCESS_ADDRESS//sourceId:1430397_1_57078

    /*D1获取空间三方鉴权配置信息(公共)[7379]   */
    Assert.isNull(obtainSpaceThirdPartyAuthenticationConfInfoComReqDto.getDnsAddresses(),"B1查询获取统一认证登录信息详情-D1获取空间三方鉴权配置信息(公共)-域名地址不能为空",false);
      obtainSpaceThirdPartyAuthenticationConfInfoComRespDto = fwBaseUserClient.obtainSpaceThirdPartyAuthenticationConfInfoCom(obtainSpaceThirdPartyAuthenticationConfInfoComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


      obtainSpaceThirdPartyAuthenticationConfInfoComRespDto_1 = obtainSpaceThirdPartyAuthenticationConfInfoComRespDto;
if((obtainSpaceThirdPartyAuthenticationConfInfoComRespDto!= null&&  obtainSpaceThirdPartyAuthenticationConfInfoComRespDto.getEndValue() !=null && obtainSpaceThirdPartyAuthenticationConfInfoComRespDto.getEndValue().equals("CAS"))) {
        //if(D1获取空间三方鉴权配置信息(公共).统一认证接入类型 等于 对接CAS)  57079

     QueryObtainUnifiedAuthenticationLoginInformationDetailComRespDto queryObtainUnifiedAuthenticationLoginInformationDetailComRespDto = null;
    if(obtainSpaceThirdPartyAuthenticationConfInfoComRespDto !=null){
          QueryObtainUnifiedAuthenticationLoginInformationDetailComReqDto queryObtainUnifiedAuthenticationLoginInformationDetailComReqDto=new QueryObtainUnifiedAuthenticationLoginInformationDetailComReqDto();
  if(obtainSpaceThirdPartyAuthenticationConfInfoComRespDto!=null){
      queryObtainUnifiedAuthenticationLoginInformationDetailComReqDto.setAuthLoginUrl(obtainSpaceThirdPartyAuthenticationConfInfoComRespDto.getAuthLoginUrl());//SimpleFieldAssign//sourceId:1430404_1_57080
queryObtainUnifiedAuthenticationLoginInformationDetailComReqDto.setAppCallBackUrl(obtainSpaceThirdPartyAuthenticationConfInfoComRespDto.getAppCallBackUrl());//SimpleFieldAssign//sourceId:1430405_1_57080
    }

    /*D1拼第三方统一认证的登录地址[8175]   */
    Assert.isNull(queryObtainUnifiedAuthenticationLoginInformationDetailComReqDto.getAuthLoginUrl(),"B1查询获取统一认证登录信息详情-D1拼第三方统一认证的登录地址-认证中心登录地址不能为空",false);
Assert.isNull(queryObtainUnifiedAuthenticationLoginInformationDetailComReqDto.getAppCallBackUrl(),"B1查询获取统一认证登录信息详情-D1拼第三方统一认证的登录地址-应用回调地址不能为空",false);
      queryObtainUnifiedAuthenticationLoginInformationDetailComRespDto = fwBaseUserClient.queryObtainUnifiedAuthenticationLoginInformationDetailCom(queryObtainUnifiedAuthenticationLoginInformationDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


      queryObtainUnifiedAuthenticationLoginInformationDetailComRespDto_1 = queryObtainUnifiedAuthenticationLoginInformationDetailComRespDto;
           }
      }
BffQueryObtainUnifiedAuthenticationLoginInformationDetailRespDto retData = new BffQueryObtainUnifiedAuthenticationLoginInformationDetailRespDto();
  if(obtainSpaceThirdPartyAuthenticationConfInfoComRespDto_1!=null){
      retData.setEndValue(obtainSpaceThirdPartyAuthenticationConfInfoComRespDto_1.getEndValue());//SimpleFieldAssign//sourceId:1430408_1
    }
if(queryObtainUnifiedAuthenticationLoginInformationDetailComRespDto_1!=null){
      retData.setSplicingAuthAddresses(queryObtainUnifiedAuthenticationLoginInformationDetailComRespDto_1.getSplicingAuthAddresses());//SimpleFieldAssign//sourceId:1430407_1
    }




return retData;
  }
/**
   * B1-执行第三方退出登录[8187]
   * gen by moon at 1/26/2024, 4:53:45 AM
   */
    @Trace(operationName = "B1-执行第三方退出登录")
    @Tags({@Tag(key = "参数",value = "arg[0]"),
            @Tag(key = "返回值",value = "returnedObj")})
  @Override
  public BffImplementThirdPartyLoginOutRespDto implementThirdPartyLoginOut(BffImplementThirdPartyLoginOutReqDto reqDto){


       //步骤0: D1-查询第三方统一认证用户信息详情 - queryAuthAccountInfoDetail
     QueryAuthAccountInfoDetailRespDto queryAuthAccountInfoDetailRespDto = null;
    QueryAuthAccountInfoDetailReqDto queryAuthAccountInfoDetailReqDto=new QueryAuthAccountInfoDetailReqDto();
  if(reqDto!=null){
      queryAuthAccountInfoDetailReqDto.setOpenId(reqDto.getAuthTicket());//SimpleFieldAssign//sourceId:1433151_1
    }

    /*D1-查询第三方统一认证用户信息详情[8188]   */
    Assert.isNull(queryAuthAccountInfoDetailReqDto.getOpenId(),"B1-执行第三方退出登录-D1-查询第三方统一认证用户信息详情-开放ID不能为空",false);
      queryAuthAccountInfoDetailRespDto = fwBaseUserClient.queryAuthAccountInfoDetail(queryAuthAccountInfoDetailReqDto).getData()/*vcase invoke 跨dubbo调用;*/;
      Assert.isTrue(queryAuthAccountInfoDetailRespDto== null||  queryAuthAccountInfoDetailRespDto.getOriginalRoleMemberId() ==null,"找不到数据，系统异常",false);



//步骤1: D-Redis清空用户信息 - clearUserInfoFromRedis
     com.wicket.okrframework.integration.dto.ClearUserInfoFromRedisRespDto clearUserInfoFromRedisRespDto = null;
    if(queryAuthAccountInfoDetailRespDto !=null){
          com.wicket.okrframework.integration.dto.ClearUserInfoFromRedisReqDto clearUserInfoFromRedisReqDto=new com.wicket.okrframework.integration.dto.ClearUserInfoFromRedisReqDto();
  if(queryAuthAccountInfoDetailRespDto!=null){
      clearUserInfoFromRedisReqDto.setOriginalRoleMemberId(queryAuthAccountInfoDetailRespDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:1433154_1
    }

    /*D-Redis清空用户信息[1710]   */
    Assert.isNull(clearUserInfoFromRedisReqDto.getOriginalRoleMemberId(),"B1-执行第三方退出登录-D-Redis清空用户信息-身份人员ID不能为空",false);
      clearUserInfoFromRedisRespDto = fwBaseDivineDataClient.clearUserInfoFromRedis(clearUserInfoFromRedisReqDto).getData()/*vcase invoke 跨dubbo调用;*/;



           }

//步骤2: D-Redis清空用户Token(公共) - clearTokenFromRedis
     com.wicket.okrframework.integration.dto.ClearTokenFromRedisRespDto clearTokenFromRedisRespDto = null;
    if(queryAuthAccountInfoDetailRespDto !=null){
          com.wicket.okrframework.integration.dto.ClearTokenFromRedisReqDto clearTokenFromRedisReqDto=new com.wicket.okrframework.integration.dto.ClearTokenFromRedisReqDto();
  if(queryAuthAccountInfoDetailRespDto!=null){
      clearTokenFromRedisReqDto.setOriginalRoleMemberId(queryAuthAccountInfoDetailRespDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:1433153_1
    }

    /*D-Redis清空用户Token(公共)[1698]   */
    Assert.isNull(clearTokenFromRedisReqDto.getOriginalRoleMemberId(),"B1-执行第三方退出登录-D-Redis清空用户Token(公共)-身份人员ID不能为空",false);
      clearTokenFromRedisRespDto = fwBaseDivineDataClient.clearTokenFromRedis(clearTokenFromRedisReqDto).getData()/*vcase invoke 跨dubbo调用;*/;



           }

//步骤3: D2执行字段名与值转数据集(公共) - implementFieldsNameAndValueToOneDatasCom
     ImplementFieldsNameAndValueToOneDatasComRespDto implementFieldsNameAndValueToOneDatasComRespDto = null;
    ImplementFieldsNameAndValueToOneDatasComReqDto implementFieldsNameAndValueToOneDatasComReqDto=new ImplementFieldsNameAndValueToOneDatasComReqDto();
  implementFieldsNameAndValueToOneDatasComReqDto.setFieldName("PUSH_EXIT_COMMAND");//CUSTOM_CONVENTION//sourceId:1438328_1
implementFieldsNameAndValueToOneDatasComReqDto.setFieldValue("TRUE");//CUSTOM_CONVENTION//sourceId:1438329_1

    /*D2执行字段名与值转数据集(公共)[8173]   */
    Assert.isNull(implementFieldsNameAndValueToOneDatasComReqDto.getFieldName(),"B1-执行第三方退出登录-D2执行字段名与值转数据集(公共)-字段名不能为空",false);
Assert.isNull(implementFieldsNameAndValueToOneDatasComReqDto.getFieldValue(),"B1-执行第三方退出登录-D2执行字段名与值转数据集(公共)-字段值不能为空",false);
      implementFieldsNameAndValueToOneDatasComRespDto = fwCompInterfaceModeClient.implementFieldsNameAndValueToOneDatasCom(implementFieldsNameAndValueToOneDatasComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;




//步骤4: D2判断是否实时推Topic消息数量(公共) - judgeIsInrealTimePushTopicMsgNumCom
     JudgeIsInrealTimePushTopicMsgNumComRespDto judgeIsInrealTimePushTopicMsgNumComRespDto = null;
    if(queryAuthAccountInfoDetailRespDto !=null){
          JudgeIsInrealTimePushTopicMsgNumComReqDto judgeIsInrealTimePushTopicMsgNumComReqDto=new JudgeIsInrealTimePushTopicMsgNumComReqDto();
  judgeIsInrealTimePushTopicMsgNumComReqDto.setIsAsynPushTopic("TRUE");//sourceId:1499631_1
judgeIsInrealTimePushTopicMsgNumComReqDto.setRealTimeListeningInstructionCode("PUSH_EXIT_COMMAND");//sourceId:1499632_1
judgeIsInrealTimePushTopicMsgNumComReqDto.setSurfaceCode("OMS_FRAMEWORK_USERS");//sourceId:1509055_1
  if(queryAuthAccountInfoDetailRespDto!=null){
      judgeIsInrealTimePushTopicMsgNumComReqDto.setOriginalRoleMemberId(queryAuthAccountInfoDetailRespDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:1499633_1
judgeIsInrealTimePushTopicMsgNumComReqDto.setUserId(queryAuthAccountInfoDetailRespDto.getUserId());//SimpleFieldAssign//sourceId:1499634_1
judgeIsInrealTimePushTopicMsgNumComReqDto.setResultAspObjId(queryAuthAccountInfoDetailRespDto.getSpaceId());//SimpleFieldAssign//sourceId:1499635_1
judgeIsInrealTimePushTopicMsgNumComReqDto.setEntityId(queryAuthAccountInfoDetailRespDto.getUserId());//SimpleFieldAssign//sourceId:1509056_1
    }
if(implementFieldsNameAndValueToOneDatasComRespDto!= null&&  implementFieldsNameAndValueToOneDatasComRespDto.getFieldsNameAndValueToOneDatasList() !=null&& !CollectionUtil.isEmpty(implementFieldsNameAndValueToOneDatasComRespDto.getFieldsNameAndValueToOneDatasList())){
      judgeIsInrealTimePushTopicMsgNumComReqDto.setRealTimeMonitoringBehaviorInstructionList(//objList-to-objLists
        implementFieldsNameAndValueToOneDatasComRespDto.getFieldsNameAndValueToOneDatasList().stream().map(item -> {
      RealTimeMonitoringBehaviorInstructionDto elm = new RealTimeMonitoringBehaviorInstructionDto();
      if(item!=null){
      elm.setBehavioralInstruction(item.getFieldName());//SimpleFieldAssign//sourceId:295292_2
elm.setCustomField1(item.getFieldValue());//SimpleFieldAssign//sourceId:295293_2
    }
        return elm;
      }).collect(Collectors.toList()));//objList-to-objLists//sourceId:1499636_1
    }

    /*D2判断是否实时推Topic消息数量(公共)[8333]   */
    Assert.isNull(judgeIsInrealTimePushTopicMsgNumComReqDto.getIsAsynPushTopic(),"B1-执行第三方退出登录-D2判断是否实时推Topic消息数量(公共)-是否异步推Topic不能为空",false);
Assert.isNull(judgeIsInrealTimePushTopicMsgNumComReqDto.getRealTimeListeningInstructionCode(),"B1-执行第三方退出登录-D2判断是否实时推Topic消息数量(公共)-实时监听指令code不能为空",false);
Assert.isNull(judgeIsInrealTimePushTopicMsgNumComReqDto.getOriginalRoleMemberId(),"B1-执行第三方退出登录-D2判断是否实时推Topic消息数量(公共)-身份人员ID不能为空",false);
Assert.isNull(judgeIsInrealTimePushTopicMsgNumComReqDto.getUserId(),"B1-执行第三方退出登录-D2判断是否实时推Topic消息数量(公共)-个人账号ID不能为空",false);
Assert.isNull(judgeIsInrealTimePushTopicMsgNumComReqDto.getResultAspObjId(),"B1-执行第三方退出登录-D2判断是否实时推Topic消息数量(公共)-开通对象ID不能为空",false);
Assert.isNull(judgeIsInrealTimePushTopicMsgNumComReqDto.getSurfaceCode(),"B1-执行第三方退出登录-D2判断是否实时推Topic消息数量(公共)-归属内容类型编码不能为空",false);
Assert.isNull(judgeIsInrealTimePushTopicMsgNumComReqDto.getEntityId(),"B1-执行第三方退出登录-D2判断是否实时推Topic消息数量(公共)-归属内容ID不能为空",false);
      judgeIsInrealTimePushTopicMsgNumComRespDto = fwCompMessageClient.judgeIsInrealTimePushTopicMsgNumCom(judgeIsInrealTimePushTopicMsgNumComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;



           }

BffImplementThirdPartyLoginOutRespDto retData = new BffImplementThirdPartyLoginOutRespDto();





return retData;
  }
    //
}
